JavaScript constructorProperty

Date 对象参考手册JavaScript Date Object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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


Date 对象参考手册JavaScript Date Object

Other extensions