constructor  Date  instance propertyS2C Home  « Globals « 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

go to home page Homepage go to top of page Top