JavaScript高级
6.14
1、基础总结深入
(1) 基本(值)类型
String 、 Number 、bollean 、undefined 、null 、
(2) 对象(引用)类型
object 、Function 、Array 、
(3) 判断类型
typeof (返回数据类型的字符串表达 , 例如:undefined('undefined')),判断null需要用全等。
instanceof (判断对象的具体类型):a instanceof b===》a 是否为b的实列,返回bollean值。
1、undefined和null的区别
undefined未定义,null定义了未赋值

浙公网安备 33010602011771号