A JavaScript clock .


The clock is running

setInterval() will call a function each 1 second, since we have set it for 1000 (milliseconds)

-- syntax
<button type="button" onclick="clearInterval(timer)">Stop the clock</button>