/**
1.基础数据类型
String、Number、Boolean、Null、Undefined、Symbol
2、引用数据类型
Object、Array、Function、...
3、检测数据类型
typeof 1 "number"
typeof '1' "string"
typeof false "boolean"
typeof undefined "undefined"
typeof null "object" 检测null类型时需注意,null返回来的object,所以要用===来比较,==会自动转换数据类型
null === null true
typeof Symbol(1) "symbol"
*/
网友评论