Answers for "date time current in js"

17

return current date in javascript

let today = new Date().toLocaleDateString()

console.log(today)
Posted by: Guest on March-01-2020
1

get current time in javascript

var d = new Date();
var n = d.toLocaleTimeString();
document.getElementById("timer").innnerHTML = n;
Posted by: Guest on April-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language