JavaScript BooleanObject


Boolean Object

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

For a complete tutorial on the Boolean object, please visitJavaScript Boolean Object Tutorial。


Boolean Object Properties

Property Description
constructor Returns a reference to the Boolean function that created this object.
prototype Allows you 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.
Other Extensions