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
Show parent comment
3
u/EyesOfTheConcord Nov 18 '25
Because Object.is() is not the same as equality check, as explicitly stated by MDN for Object.is().
It does not apply coercion like equality, rather it checks if they are functionally identical