It is proposed that an isNaN property be added to the Number constructor. It could be implemented like this:
(function (global) { var global_isNaN = global.isNaN; Object.defineProperty(Number, 'isNaN', { value: function isNaN(value) { return typeof value === 'number' && global_isNaN(value); }, configurable: true, enumerable: false, writable: true }); })(this);
This is better than the global isNaN function because it is not confused by type coercion.
— Douglas Crockford 2010/12/15 20:27 — Brendan Eich 2011/04/28 00:20