constructor  Date  instance property JS Home  <<  JS Reference  <<  Date  <<  constructor

Description

Returns a reference to the function that created the prototype.

Syntax

Signature Description
aDate.constructorReturns a reference to the function that created the prototype.

Parameters

None.

Examples

The code below displays the constructor property of Date.




var todaysDate = new Date();
alert('Date constructor is ' + todaysDate.constructor);


Press the button below to action the above code:

Related Tutorials

JavaScript Intermediate Tutorials - Lesson 2 - Dates and Times