function clock() { // Create An Instance Of A Clock Object const Time = new Date(); let Hour = Time.getHours(); let Minute = Time.getMinutes(); let Second = Time.getSeconds(); // Check Digits Count if (Minute < 10){ Minute = "0" + Minute } if (Second < 10){ Second = "0" + Second } // Select Element From Html File To Show let showTime = document.querySelector('#time') showTime.innerHTML = Hour + ":" + Minute + ":" + Second // Repeat Clock Function Per Second setTimeout(clock, 1000) } window.addEventListener('load', clock)