Luke Hoban lukeh at
Thu Dec 13 19:50:01 PST 2012

>> From: es-discuss-bounces at [mailto:es-discuss-bounces at] On Behalf Of John-David Dalton
>> Subject: Number.isNaN

>> I noticed that ES6  `Number.isNaN` checks `Type(number)` of Number, would it make sense to instead check that the [[BuiltinBrand]] is BuiltinNumberWrapper similar to `Array.isArray`'s check. This would also allow `Number.isNaN(Object(NaN))` to return `true`. Thoughts?

The current draft spec [0] uses a ToNumber coercion and checks whether this results is NaN.  So "Number.isNaN(Object(NaN))" will return "true".



More information about the es-discuss mailing list