Easy Tutorial
❮ Jsref Search Js Output ❯

JavaScript Boolean Object


The Boolean object is used to convert non-boolean values to boolean values (true or false).


Online Examples

Check Boolean Value


Complete Boolean Object Reference Manual

We provide the JavaScript Boolean Object Reference Manual, which includes all properties and methods available for the Boolean object.

This manual contains detailed descriptions and examples for each property and method.


Creating a Boolean Object

The Boolean object represents two values: "true" or "false".

The following code defines a Boolean object named myBoolean:

If the Boolean object has no initial value or its value is:

Then the object's value is false. Otherwise, its value is true (even when the variable's value is the string "false")!

❮ Jsref Search Js Output ❯