Search within TutorialsPark

Javascript Boolean Object

Learn to use JavaScript Boolean object .

Javascript Boolean Object: Introduction

The JavaScript Boolean Object is a reference to Boolean Values, to create a boolean object using the Boolean Constructor and then pass either true or false as values.

Example: Javascript Boolean Object: Boolean Constructor.

Give it a TRY! » Note: The Boolean Object returns either true or false.

Javascript Boolean Object : Boolean Type

In the below demo, a Boolean object is created with the value of false, the object is then ANDed with the primitive value of true.

According to Boolean Math, false AND true results in false, but the actual output is true because all objects automatically get converted to true Boolean Expressions.

Example: JavaScript Boolean Object : Boolean Type

Give it a TRY! » Note: The operation true ANDed with true returns true.