js中的原始类型和引用类型

ECMAScript中的五种原始类型:Number、String、Null、Undefined、Boolean

1.比较运算,数组、对象不是原始类型。

//true
null === null
'abc' == 'abc'
1 == 1
//false
[1,2,3] == [1,2,3]
{} == {}

 

posted @ 2017-04-26 11:39  简惬  阅读(1224)  评论(0编辑  收藏  举报