Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript Boolean object

JavaScript Boolean object


Boolean object

The Boolean object is used to convert a value that is not of Boolean type into a Boolean value (true or false).

For the complete Boolean object tutorial, please 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 an object.

Boolean object methods

Method Description
toString() Converts a Boolean value to a string and returns the result.
valueOf() Returns the primitive value of the Boolean object.