I was wondering if it is possible to remove the seconds group in a live clock made with JavaScript. Ive been tinkering with it for a while now and have not been successful so far. Any advice or guidance well be gratefully welcomed.
Here's what I'm working with...
function myClock() {
setTimeout(function() {
const date = new Date();
const timeOutput = date.toLocaleTimeString();
document.getElementById("demo").innerHTML = timeOutput;
myClock();
}, 1000)
}
myClock();
<div id="demo"></div>