I noticed that the setInterval part makes the code not work. No error is being shown. It works when I manually press the button one at a time.
const stopWatch = document.getElementById("time");
let totalSecs = 0;
const start = document.getElementById("start");
let timeCount = setInterval(seconds, 1000);
let seconds = () => {
start.innerHTML = "Clicked!";
++totalSecs;
let hr = Math.floor(totalSecs / 3600);
let min = Math.floor(totalSecs / 60);
let sec = totalSecs - hr * 3600 - min * 60;
stopWatch.innerHTML = `${hr} : ${min} : ${sec}`;
}
document.addEventListener("click", seconds);
<div id="time">
</div>
<button id="start">Start</button>