var bool1 = false
var bool1 = true
console.log(bool1) //true
console.log(typeof bool1) //boolean
布尔类型的情况:
1、函数的返回值
2、运算的结果
true – 1
false – 0
console.log(6 > 5)
console.log(isNaN(false)) //false
console.log(isNaN(true)) //false
var empty = null
console.log(empty) //null
console.log(typeof empty) //object
var a
console.log(a) //undefined
console.log(typeof a) //undefined
console.log(isNaN(null)) //false --- 0
console.log(isNaN(undefined)) //true