JavaScript NaN 属性
最后更新于:2022-03-26 22:09:13
JavaScript NaN 属性
JavaScript 全局函数
定义和用法
NaN 即非数值(Not a Number),NaN 属性用于引用特殊的非数字值,该属性指定的并不是不合法的数字。
NaN 属性 与 Number.Nan 属性相同。
提示: 请使用 isNaN() 来判断一个值是否是数字。原因是 NaN 与所有值都不相等,包括它自己。
语法
浏览器支持





所有主要浏览器都支持 NaN 属性
技术细节
返回值: |
NaN |
JavaScript 版本: |
1.3 |
JavaScript 全局函数