JavaScript Boolean object
Boolean object
The Boolean object is used to convert a value that is not Boolean type to a Boolean type value (true or false).
For the full tutorial on Boolean objects, visit the JavaScript Boolean object tutorial.
Boolean object properties
Attributes | describe |
---|---|
constructor | Returns a reference to the Boolean function created this object |
prototype | Enable you to add properties and methods to the object. |
Boolean object method
method | describe |
---|---|
toString() | Convert Boolean values into strings and return results. |
valueOf() | Returns the original value of the Boolean object. |