JavaScript Date constructor Property

JavaScript Date constructor Property

In this post, the constructor property returns the function that created the string's prototype

  • JavaScript dates the constructor property returns work Date() { [native code] } 
  • JavaScript numbers the constructor property returns work Number() { [native code] } 
  • JavaScript strings the constructor property returns work String() { [native code] }
  • In JavaScript, the constructor property restores the constructor work for an article. 
  • The arrival esteem is a reference to the capacity, not the name of the capacity
<p id="divdemo"></p>

var dt = new Date();
document.getElementById("divdemo").innerHTML = dt.constructor;
Returns the "time" portion of the Date as a human-readable string

Returns the primitive value of a Date object. Overrides the Object.prototype.valueOf() method

Converts a date to a string using the UTC timezone


function Date() { [native code] }