Converts a string representation of a logical value to its Boolean object equivalent. This function is static and can be invoked without creating an instance of the object.
Use the parse function to create a Boolean value from a string representation. The value argument must be "true" or "false" (case insensitive). The string can contain white space. If the string cannot be converted to a Boolean value, an exception is thrown.
var a = new Boolean(true);
if (a == true){
alert("a = true");
}else{
alert("a = false");
}
var b = Boolean.parse("true");
if (b == true){
alert("b = true");
}else{
alert("b = false");
}