其它类型转布尔类型
number
string -> boolean
undefined
null
Boolean(变量)
=>返回布尔类型值
100 -> true
0 -> false
'hello' -> true
'' -> false
undefined -> false
null -> false
<script>
var num = null
console.log( Boolean(num) , typeof Boolean(num) )
</script>