In JavaScript, the constructor property returns the constructor function for an object.
In JavaScript, the constructor property returns the constructor function for an object.
Date.constructor
function Date() { [native code] }
The constructor property returns a date's constructor function:
//The constructor property returns the function that created the string's prototype: var d = new Date(); console.log(d.constructor);