标签:als bsp log rgba 布尔 bcd null console 数据类型转换
//布尔类型转换 var a = Boolean(‘0‘);//打印true 因为字符串有数据所以是true var b = Boolean(0);//打印false var c = Boolean(‘1‘);//打印true var d = Boolean(1);//打印true var e = Boolean(null);//打印false var f = Boolean(undefined);//打印false var g = Boolean(‘abcd‘);//打印true var h = Boolean(‘‘);//打印false console.log(a,b,c,d,e,f,g,h);
标签:als bsp log rgba 布尔 bcd null console 数据类型转换
原文地址:https://www.cnblogs.com/dazahui/p/14410187.html