Number.NaN
Number.NaN
Number.NaN
表示“非数字”(Not-A-Number)。和NaN
相同。
不必创建一个Number
实例来访问该属性,使用 Number.NaN
来访问该静态属性。
| Number.NaN
属性的属性特性 |
|:----|
| Writable | no |
| Enumerable | no |
| Configurable | no |
规范
Specification | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initial definition. Implemented in JavaScript 1.1. |
ECMAScript 5.1 (ECMA-262)The definition of 'Number.NaN' in that specification. | Standard | |
ECMAScript 2015 (6th Edition, ECMA-262)The definition of 'Number.NaN' in that specification. | Standard | |
ECMAScript Latest Draft (ECMA-262)The definition of 'Number.NaN' in that specification. | Draft | |
浏览器兼容性
Feature | Chrome | Firefox | Edge | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |