JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<span id = "Timer">00:00:00</span>
</body>
</html>
JavaScript
var clock = function() {
var mytime = new Date();
var seconds = mytime.getSeconds();
var minutes = mytime.getMinutes();
var hours = mytime.getHours();
var currentTime = hours + ":" + minutes + ":" + seconds;
document.getElementById("Timer").firstChild.nodeValue = currentTime;
}
setInterval(clock, 1000);