Le 18/12/2012 14:43, gaz Heyes a écrit :
On 14 December 2012 16:39, Allen Wirfs-Brock <al...@wirfs-brock.com <mailto:al...@wirfs-brock.com>> 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 :-)

David
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to