JavaScript constructorProperty
Example
Returns the function prototype that created the Date object:
myDate.constructor;
Output result:
function Date() { [native code] }
Try it Yourself »
Definition and Usage
The constructor property returns a reference to the Date function that created the object.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the constructor property.
Syntax
Date.constructor
Technical Details
| Return value: | A function object. The function prototype of the Date object. |
|---|---|
| JavaScript version: | 1.1 |
Other extensions
JavaScript Date Object