constructor
Object
instance property
JS Home <<
JS Reference <<
Object <<
constructor
Description
Returns a reference to the function that created the prototype.
- All objects are descendants of
Object
. - All objects inherit their properties and methods from
Object.prototype
.
Syntax
Signature | Description |
---|---|
anObject.constructor | Returns a reference to the function that created the prototype. |
Parameters
None.
Examples
The code below displays the prototype function of Object
.
var o = new Object();
alert('Object constructor is ' + Object.constructor);
Related Tutorials
JavaScript Advanced Tutorials - Lesson 5 - Elegant Object Creation