How to Get the Current Date and Time in JavaScript

const today_date = new Date();
console.log(today_date);
console.log(today_date.getDay());
console.log(today_date.getMonth());
console.log(today_date.getFullYear());
console.log(today_date.getHours());

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *