VOOZH about

URL: https://www.geeksforgeeks.org/javascript/javascript-boolean-constructor/

⇱ JavaScript Boolean() Constructor - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

JavaScript Boolean() Constructor

Last Updated : 11 Jul, 2025

The Boolean() constructor in JavaScript is a built-in function that can be used to create a new Boolean object. The Boolean() constructor takes a single argument and returns a Boolean object with a value of true or false depending on the type and value of the argument passed in. 

Syntax:

Boolean(value)

Parameter: This constructor accepts a single argument 

  • value: The parameter contains the value of the boolean

Below are examples of the Boolean Constructor property.

Example 1: In this example, we will create simple boolean values

Output:

true
false

Example 2: In this example, we will convert String, Number, and Date to boolean data type using the Boolean constructor as a function

Output:

true
true
false
true

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Mozilla Firefox
  • Safari
  • Opera

We have a complete list of Javascript Boolean methods, to check those please go through the article.

Comment