/*
* 将其他的类型转换成Boolean
* - 使用Boolean()函数来将a转换为布尔值
* -数字—》布尔
* -除了0和NaN转换为布尔值为false 其他的都是true
*
* -字符串—》布尔
* - 除了空串,其余的都是true
* -null和undefined 都是false
*/
var a = 123;//true
a= -123;//true
a= 0;//false
a= Infinity;//true
a = NaN;//false
a = Boolean(a);
console.log(a);
b= "hello";
b =Boolean(b);
console.log(typeof b);
console.log(b);
c = null
c = Boolean(c);
console.log(typeof c);
console.log(c);
d = null
d = Boolean(d);
console.log(typeof d);
console.log(d);