JavaScript boolean.constructor Property
Shubham Vora
Jan 30, 2023
-
Syntax of JavaScript
boolean.constructor
Property -
Use the
boolean.constructor
Property in JavaScript
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.
Author: Shubham Vora