gaz Heyes gazheyes at
Tue Dec 18 05:43:40 PST 2012

On 14 December 2012 16:39, Allen Wirfs-Brock <allen at> wrote:

> No,  the whole point of Number.isNaN is to provide a definitively test for
> NaN number values which  cannot be tested for in the usual way using ===.
> The definitiveness of the test would be lost if other values such a Number
> wrapper instance also returned true when passed as the argument for
> Number.isNaN.

Why is it needed? Can't we just simply do:

function isReallyNaN(o) {
 return o!=o&&isNaN(o);

I don't get the point of detecting Object(NaN) since it's type is an object
not number.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list