David Bruant bruant.d at
Tue Dec 18 05:56:21 PST 2012

Le 18/12/2012 14:43, gaz Heyes a écrit :
> On 14 December 2012 16:39, Allen Wirfs-Brock <allen at 
> <mailto: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?
If anything, to explain devs that isNaN is broken and they should move 
to Number.isNaN.

> Can't we just simply do:
> function isReallyNaN(o) {
>  return o!=o&&isNaN(o);
> }
"o!=o" will be enough I think. You've got a polyfill :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list