JavaScript Dates
Using new Date()
new Date() without arguments, creates a date object with the current date and time:
const d = new Date();
document.getElementById(“demo”).innerHTML = d;
new Date() without arguments, creates a date object with the current date and time:
const d = new Date();
document.getElementById(“demo”).innerHTML = d;