Last Updated : 11 Jul, 2025
JavaScript boolean constructor property returns the constructor function for an object. The function which is returned by this property is just the reference to this function, not a Boolean containing the function’s name The JavaScript number constructor, string constructor, and boolean constructor return function Boolean() { [native code] }, function Number() { [native code] }, and function String() { [native code] } respectively.
Syntax:
boolean.constructor
Parameter: This method does not accept any parameter.
Return value: It returns the function Boolean() { [native code] }.
Below are examples of the Boolean constructor property:
Example 1:
javascript
function func() {
let bool = false;
let value = bool.constructor;
console.log(value);
}
func();
Output:
ƒ Boolean() { [native code] }
Example 2: This example illustrates the boolean constructor property.
JavaScript
function gfg() {
let bool = false;
console.log(bool.constructor);
}
gfg()
[Function: Boolean]
Supported Browsers: The browsers supported by JavaScript Boolean constructor Property are listed below:
We have a complete list of Javascript Boolean methods, to check those please go through the Javascript Boolean Complete Reference article.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4