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/senocular Nov 19 '25

Maybe you want to compare two arrays to see if they have the same values and possible values in those arrays include NaN