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.constructorReturns 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);

Press the button below to action the above code:


Related Tutorials

JavaScript Basic Tutorials - Lesson 7 - Objects

go to home page Homepage go to top of page Top