JS:Boolean
Boolean数据类型:
有两个值:true false
Boolean会把不是Boolean的值变为Boolean值
var a = 1; var b = true; var c = 0; var d = "0"; var e = "1"; var f = ""; var g = [0]; var h = [[]]; var i = {}; document.write(a==b); //true document.write(c==b); //false document.write(d==b); //false document.write(e==b); //true document.write(f==b); //false document.write(g==b); //false document.write(h==b); //false document.write(i==b); //false
仍有例子有待补充......