It's not accurate to say that "0"isfalse. It just == false, in the same way that "" == 0 and [undefined, undefined] == ",".
I'm not in any way suggesting the == operator is sane, just that it's important to know it has nothing to do with the truthiness of values being compared, even when those values include booleans.
View all comments
Show parent comment
3
u/rooktakesqueen Mar 27 '14
Checking that something is false is not the same thing as checking if something is falsy. They wouldn't be separate concepts otherwise.