The Boolean object in JavaScript.
var myBooleanVariable = new Boolean(value)
If value is omitted or is 0, -0, null (not 'null'), false (not 'false), NaN (not 'NaN'), undefined (not 'undefined'), or an empty string ("" or ''), then the object has an initial value of false. All other values, including any object (besides null) will create a Boolean object with an initial value of true.
A Boolean object is not the same as the primitive Boolean values of true and false.
A Boolean object is not the same as the Boolean function.
x = new Boolean(false); if(x); //the condition is true x = false; if(x) //the condition is false
x = Boolean(expression) //preferred x = new Boolean(expression) //don't use
Page Modified: (Hand noted: 2007-08-08 17:50:44Z) (Auto noted: 2008-12-16 18:56:37Z)