JavaScript Boolean constructorProperty

Boolean 对象参考手册JavaScript Boolean Object

Example

Return viamyvarThe function created by the object's prototype:

var myvar = new Boolean(1);
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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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


Boolean 对象参考手册JavaScript Boolean Object

Other Extensions