JS Boolean Object
Boolean object
A Boolean object is used to convert a value that is not of type Boolean to a value of type Boolean (true or false).
For a complete tutorial on Boolean objects, visit JavaScript Boolean Object Tutorial .
Boolean object properties
Property | Description |
---|---|
constructor | Returns a reference to the Boolean function that created this object. |
prototype | Gives you the ability to add properties and methods to objects. |
Boolean object methods
Method | Description |
---|---|
toString() | Converts a Boolean value to a string and returns the result. |
valueOf() | Returns the original value of the Boolean object. |