One note though... Actually, technically speaking, and according to the JavaScript specs (ECMA 262), there are only 7 values that are Falsy, meaning that they are considered false when encountered in a Boolean context.
And when it comes to document.all it's not part of the JavaScript specs per se. It's part of the DOM API (W3C), which browser-based only (Node.js doesn't have a document object, nor a DOM).
It is 7 but not 8? Which one is not listed... (I tried to search for "falsy" or "falsey" in that docs but can't find any match)... true, document.all really is inside of a browser only, so I think I will update the post
Good write-up!
One note though... Actually, technically speaking, and according to the JavaScript specs (ECMA 262), there are only 7 values that are Falsy, meaning that they are considered false when encountered in a Boolean context.
And when it comes to
document.all
it's not part of the JavaScript specs per se. It's part of the DOM API (W3C), which browser-based only (Node.js doesn't have a document object, nor a DOM).Cheers ;)
It is 7 but not 8? Which one is not listed... (I tried to search for "falsy" or "falsey" in that docs but can't find any match)... true,
document.all
really is inside of a browser only, so I think I will update the postYou can find more info here: developer.mozilla.org/en-US/docs/G...
oh... not counting
-0
... depending on how you look at it. It can be incorrect, because0
and-0
are technically different.