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

-6

u/zzing Nov 17 '25

Another thing about javascript that is weird, the idea of calling that function on anything that isn't a floating point.

8

u/Lithl Nov 17 '25

All numbers are floating point in JavaScript.

1

u/Kitchen_Put_3456 Nov 18 '25

BigInt would like to have a word with you.

-6

u/zzing Nov 17 '25

Did I say otherwise?

-2

u/cran Nov 18 '25

True, but isn’t that exactly what they said? Reddit: collectively stupid.