Home >>JavaScript Date Object Methods >JavaScript Date constructor Property

JavaScript Date constructor Property

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

Browser Support

Property Chrome Edge Firefox Safari Opera
constructor Yes Yes Yes Yes Yes
Here is an example of JavaScript Date constructor property:
<html>
<body>
<p id="demo"></p>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.constructor;
</script>
</body>
</html>
Output:
function Date() { [native code] }

No Sidebar ads