Home >>JavaScript Date Object Methods >JavaScript Date constructor Property
JavaScript constructor property is used to return the constructor function for an object. Its return the reference to the function and not the name of the function.
Syntax:Date.constructor
Property | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
constructor | Yes | Yes | Yes | Yes | Yes |
<html> <body> <p id="demo"></p> <script> var d = new Date(); document.getElementById("demo").innerHTML = d.constructor; </script> </body> </html>