JavaScript Boolean constructor
Example
let bool = false;
bool.constructor
// Returns function Boolean() { [native code] }
Try it Yourself »
Definition and Usage
The constructor property returns the function that created the Boolean prototype.
For JavaScript booleans the constructor property returns:
function Boolean() { [native code] }
Browser Support
Boolean.constructor is fully supported in all browsers:
| Chrome | IE | Edge | Firefox | Safari | Opera |
| Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
boolean.constructor
Technical Details
| Return Value: | function Boolean() { [native code] } |
|---|---|
| JavaScript Version: | ECMAScript 1 |
Related Pages
JavaScript Tutorial: JavaScript Booleans
JavaScript Tutorial: JavaScript Data Types
JavaScript Tutorial: JavaScript Object Constructors

