r/programming • • Mar 26 '14

JavaScript Equality Table

http://dorey.github.io/JavaScript-Equality-Table/
809 Upvotes

331 comments sorted by

View all comments

1

u/libertasmens Mar 26 '14 edited Mar 26 '14

Wait... so

false == "0"

is true,

if( false ) return;

won't return, but

if( "0" ) return;

will return? Wat?

0

u/[deleted] Mar 26 '14

[deleted]

1

u/libertasmens Mar 27 '14

Makes sense, while also not making sense (as in why this is allowed). But I suppose that's a result of my C-minded programming.

0

u/[deleted] Mar 27 '14

[deleted]

→ More replies (1)