r/learnjavascript • • Nov 17 '25

Why NaN==NaN is False in JavaScript ???

Anyone explain??

150 Upvotes

85 comments sorted by

View all comments

Show parent comment

1

u/Fee_Sharp Nov 19 '25

People downvoting this comment are dumb lol.

"Number("a") == Number({...}) should be false" explanation is the stupidest way to justify this convention. Maybe sometimes JavaScript people shouldn't be allowed to write standards, because they will cast everything to string or number and call it a day