Date constructor property with example in JavaScript

JavaScript Date constructor property: Here, we are going to learn about the constructor property of Date class in JavaScript.
Submitted by IncludeHelp, on March 04, 2019

JavaScript Date constructor property

Date constructor property is used to get details of the Date's class constructor function. It does not take any parameter and returns the Date constructor property.

Date class constructor function can be printed using constructor property.


    var dt = new Date();
    dt.constructor ;


    var dt = new Date();
    dt.constructor ;
    function Date() { [native code] }

JavaScript code to get the Date class constructor details

<head><title>JavaScipt Example</title></head>

	var dt = new Date();
	document.write("constructor is: " + dt.constructor + "<br>");


constructor is: function Date() { [native code] }

JavaScript Date Object Methods »

All JavaScript Examples

Comments and Discussions!

Load comments ↻

Copyright © 2024 All rights reserved.