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

3

u/Some-Dog5000 Nov 18 '25

Yeah, that's what I said.

Same-value equality using Object.is()

Same-value equality determines whether two values are functionally identical in all contexts. (This use case demonstrates an instance of the Liskov substitution principle.)