JavaScript constructor Property
Example
Return a reference to the Number function that created this object:
num.constructor;
Output result:
function Number() { [native code] }
Try it »
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
number
.constructor
Technical Details
| Return Value: | A function object. A reference to the Number function that created this object |
|---|---|
| JavaScript version: | 1.1 |
JavaScript Number object