var x=true; Boolean(x); //true var y=false; Boolean(y); //false
Boolean( 3 > 5); //false var x="perschon"; Boolean( x.indexOf('d')); //true
All values, strings and real statements are true.
Boolean(-1); //true Boolean(5); //true Boolean(97.3); //true Boolean("perschon"); //true Boolean(9 > 8); //true
null,0,empty string and undefined variables etc are false.
Boolean(0); //false Boolean(""); //false Boolean(null); //false Boolean(4/0); //false var x; Boolean(x); //false