Is it 'true'?
-
// Why would we be sane and use real booleans??
// if ( node.hasThumbnail === 'true' ) {From code that is licensed under the MIT license, so feel free to use it :laugh:
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
// Why would we be sane and use real booleans??
// if ( node.hasThumbnail === 'true' ) {From code that is licensed under the MIT license, so feel free to use it :laugh:
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
You have to be at least a little bit insane to be a developer. It's OK.
There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.
-
// Why would we be sane and use real booleans??
// if ( node.hasThumbnail === 'true' ) {From code that is licensed under the MIT license, so feel free to use it :laugh:
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
that code means that it must really be 'true' not 'TRUE' or 1, or even non-zero. There are a lot of cases where it makes sense. So such code might get enforced by some source code scanner policies. :cool: You learn to honor such tools, when co-working with some code-jockeys :~
Press F1 for help or google it. Greetings from Germany
-
that code means that it must really be 'true' not 'TRUE' or 1, or even non-zero. There are a lot of cases where it makes sense. So such code might get enforced by some source code scanner policies. :cool: You learn to honor such tools, when co-working with some code-jockeys :~
Press F1 for help or google it. Greetings from Germany
-
// Why would we be sane and use real booleans??
// if ( node.hasThumbnail === 'true' ) {From code that is licensed under the MIT license, so feel free to use it :laugh:
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
KarstenK's post reminds me of DCL and the many things that test as True -- including (but not limited to) 'Y', '1'...
-
// Why would we be sane and use real booleans??
// if ( node.hasThumbnail === 'true' ) {From code that is licensed under the MIT license, so feel free to use it :laugh:
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
Because Javascript equality is so f*cked that you have to know when to use
==
vs.===
, and even then there's some weird BS with the null, empty, void, dunno, you're guess is as good as mine states that a Javascript variable can be in that it only makes sense to equate to a literal string? MarcLatest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802