javascript的原始类型(primitive type)之间的关系。

1:有5种primitive type,分别是Undefined、Null、Boolean、Number 和 String。

2:



3:alert(null == undefined);结果为true
原因:undefined值是通过null派生出来的,==时它会自动转化为null,所以返回true。不过如果用严格比较符===,不发生转化,将返回false。


原文地址:https://www.cnblogs.com/momozjm/p/7721976.html