API · JavaScript
JavaScript boolean.constructor Property
The boolean.constructor property is used to get the function that created a Boolean prototype.
In JavaScript, the boolean.constructor property returns the function that created this prototype.
Syntax of JavaScript boolean.constructor Property
boolean.constructor;
Parameter
JavaScript boolean.constructor property has no parameters.
Return
JavaScript boolean.constructor property returns the function that created its prototype.
Use the boolean.constructor Property in JavaScript
In JavaScript, the boolean.constructor method gives the function that created its prototype. Below we have created an object and used the boolean.constructor property.
var boolean = new Boolean( );
console.log(boolean.constructor);
Output:
function Boolean() { [native code] }
The boolean.constructor method is supported in most browsers.