JavaScript NaN 属性
最后更新于:2022-03-26 22:03:56
JavaScript NaN 属性
JavaScript Number 对象
定义和用法
NaN 属性是代表非数字值的特殊值。该属性用于指示某个值不是数字。
可以把 Number 对象设置为该值,来指示其不是数字值。
提示: 请使用 isNaN() 全局函数来判断一个值是否是 NaN 值。
语法
浏览器支持





所有主流浏览器都支持 NaN 属性。
技术细节
返回值: |
NaN |
JavaScript 版本: |
1.3 |
JavaScript Number 对象