JavaScript Boolean constructorProperty
Example
Return viamyvarThe function created by the object's prototype:
var myvar = new Boolean(1);
myvar.constructor;
myvar.constructor;
Result output:
function Boolean() { [native code] }
Try it Yourself »
Definition and Usage
The constructor property returns a reference to the Boolean function that created this object.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the constructor property.
Syntax
boolean.constructor
Technical Details
| Return value: | Function object. Returns the function prototype that created the Boolean object. |
|---|---|
| JavaScript Version: | 1.1 |
Other Extensions
JavaScript Boolean Object