1.类型分析:
js中的数据类型有undefined,boolean,number,string,object等5种,前4种为原始类型,第5种为引用类型。
未定义的值和定义未赋值的为undefined,null是一种特殊的object,NaN是一种特殊的number。
![](https://img.haomeiwen.com/i27493437/85c680d58fe631ab.png)
![](https://img.haomeiwen.com/i27493437/4733ef2d9e2f0678.png)
![](https://img.haomeiwen.com/i27493437/86529e1d6b95efe9.png)
![](https://img.haomeiwen.com/i27493437/5bc373e3970e4ab7.png)
![](https://img.haomeiwen.com/i27493437/5447beb10d074a31.png)
![](https://img.haomeiwen.com/i27493437/1b24ac190914dcc2.png)
未定义的值和定义未赋值的为undefined,null是一种特殊的object,NaN是一种特殊的number。
本文标题:Javascript 中 null、NaN和undefined的
本文链接:https://www.haomeiwen.com/subject/bwmsqrtx.html
网友评论