On 14 December 2012 16:39, Allen Wirfs-Brock <[email protected]> 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.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss