Skip to content
How to add current time
Profile icon

How do I add the current time of the user in html,css,js.

You are viewing a single comment. View All
Profile icon

My bad, it looks like doesn't return a date like I remembered. Instead, construct a new Date object to get the current date in local time.

console.log(new Date())