2
rated 0 times
[
3]
[
1]
/ answers: 1 / hits: 43105
/ 11 Years ago, wed, november 13, 2013, 12:00:00
Why does NaN === NaN
return false
in Javascript?
> undefined === undefined
true
> NaN === NaN
false
> a = NaN
NaN
> a === a
false
On the documentation page I see this:
Testing against NaN
Equality operator (
==
and===
) cannot be used to test a value againstNaN
. UseisNaN
instead.
Is there any reference that answers to the question? It would be welcome.
More From » nan