Home » JavaScript

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.

Syntax:

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

Examples:

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

JavaScript code to get the Date class constructor details

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

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

Output

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





Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.