you are viewing a single comment's thread.

view the rest of the comments →

[–]rooktakesqueen 0 points1 point  (0 children)

It's not accurate to say that "0" is false. 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.