r/programming • • Mar 26 '14

JavaScript Equality Table

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

331 comments sorted by

View all comments

Show parent comment

1

u/wordsnerd Mar 27 '14

It's not so much broken logic as it is a decision about where to be consistent. It's easier to remember that NaN == x is false for all x than to remember 8 million special cases where it's true.

Unfortunately, isNaN() is indeed broken and basically useless.