js 数据类型判断
typeof 判断
- typeof 能判断,数字,字符串,布尔值,undefined,function,不能判断Object,Array,Funtion,mull.
instanceof 判断
- instanceof 用来判断 Object,Array,Function 的真假
=== 判断
- === 用来判断一个数据类型是否为null
let a = null
console.log (a === null)
博客列表 >js 数据类型判断方法
let a = null
console.log (a === null)