`0 === false` is maybe the only thing that I actually hate about javascript. Mutability, I understand and thus can deal with it. Scope, no biggie. But resolving a number to false, when all other numbers resolve to true? Inexplicable.
Saw the title. Immediately thought of something I saw today at work. Not too different from yours. 'if ('True' == 'True')'. I should note that this is javascript generated by a template file.
Yeah, is one of the things I don't like about JS. The typeof operator should be able to handle those cases. Or a new operator that returns a boolean would be nice.
reply