constructor Object instance propertyS2C Home
« Globals « 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 Basic Tutorials - Lesson 7 - Objects