The Boolean() constructor is used to manufacture new instances of the built-in Boolean object.
When the Boolean() constructor is called by the new operator, it initializes a brand new Boolean object instance.
The value of the new Boolean object instance is the same as the Boolean value yielded by the type conversion of the Boolean() constructor's parameter.
|No value||Always false|
|Boolean||No conversion, the input value is returned unchanged|
|Number||The result is false if the argument is 0 or NaN, otherwise it is true|
|String||Zero length strings return false otherwise the result is true|
The result of calling the constructor is a Boolean object whose value is true or false depending on the input value. If the value-input parameter is omitted, then a Boolean object with value false is returned by default.
Note that unlike the Object() constructor, which can be called without its parentheses, calling the Boolean() constructor without parentheses yields an uninitialized object.
Note also that using Boolean objects in conditional code is prone to risks due to the fact that all objects yield a Boolean true value when tested in logical expressions. This includes Boolean objects whose present value is false.
ECMA 262 edition 2 - section - 126.96.36.199
ECMA 262 edition 2 - section - 15.6.1
ECMA 262 edition 2 - section - 15.6.2
ECMA 262 edition 2 - section - 15.6.3
ECMA 262 edition 2 - section - 188.8.131.52
ECMA 262 edition 3 - section - 15.6.2