null === undefined;
As you can see, hard equality reports that the variable answer is the number 5, but not the
string "5". It also correctly reports that null and undefined are two different values.
Note: When is Not a Number not Not a Number?
The only strange result produced by hard equality is this:
NaN === Nan;
this, there is a special function called isNaN to test it:
Unfortunately, this doesn't always work properly, as can be seen in this ex-
This is because the function first of all tries to convert the string to a number,
and strings without numerals are converted to NaN:
Search WWH ::