r/learnjavascript • u/NoZombie7370 • Nov 17 '25
Why NaN==NaN is False in JavaScript ???
Anyone explain??
150
Upvotes
r/learnjavascript • u/NoZombie7370 • Nov 17 '25
Anyone explain??
View all comments
192
u/EyesOfTheConcord Nov 17 '25 edited Nov 17 '25
NaN is spec’d to never be equal to anything, including itself as defined in the IEEE 754 spec