基本数据类型
string number null undefined boolean symbol
null getElementById() 找不到时返回null
undefined 定义了没有赋值
数组越界
对象中没有的属性
函数没有返回值
引用数据类型
引用数据类型
array object
typeof 判断数据类型
typeof 'abc' = "string"
typeof 123 = "number"
typeof true = "boolean"
typeof null ="object"
typeof undefined = "undefined"
typeof [1,2,3] ="object"
typeof {name:'zs'} ="object"
Array.isArray(arr) 数组自带的方法
arr instanceof Array arr是否是Array的实例化对象
arr.constructor == Array arr的构造函数是否是Array
1516

被折叠的 条评论
为什么被折叠?



