--- title: Number.NaN slug: Web/JavaScript/Reference/Global_Objects/Number/NaN translation_of: Web/JavaScript/Reference/Global_Objects/Number/NaN ---
{{JSRef("Global_Objects", "Number")}}

概述

Number.NaN 表示“非数字”(Not-A-Number)。和 {{jsxref("Global_Objects/NaN", "NaN")}} 相同。

不必创建一个 {{jsxref("Global_Objects/Number", "Number")}} 实例来访问该属性,使用 Number.NaN 来访问该静态属性。

{{js_property_attributes(0,0,0)}}

规范

Specification Status Comment
{{SpecName('ES1')}} {{Spec2('ES1')}} Initial definition. Implemented in JavaScript 1.1.
{{SpecName('ES5.1', '#sec-15.7.3.4', 'Number.NaN')}} {{Spec2('ES5.1')}}  
{{SpecName('ES6', '#sec-number.nan', 'Number.NaN')}} {{Spec2('ES6')}}  
{{SpecName('ESDraft', '#sec-number.nan', 'Number.NaN')}} {{Spec2('ESDraft')}}  

浏览器兼容性

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}

相关链接