Boolean

The Boolean constructor creates Boolean objects (not to be confused with Boolean primitives). The Boolean objects are not that useful and are listed here for the sake of completeness.

    > var b = new Boolean(); 
    > b.valueOf(); 
    false 
    > b.toString(); 
    "false" 

A Boolean object is not the same as a Boolean primitive value. As you know, all objects are truthy:

    > b === false; 
    false 
    > typeof b; 
    "object" 

Boolean objects don't have any properties other than the ones inherited from Object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.136.90