![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fb5xUmc%2FbtrornyUEKc%2FM7ByMsZQAKmQHlQSS7cvOk%2Fimg.gif)
JavaScript
JS | clock(digital) , add back to top button
clock (digital) #html 00:00 -------------------------------------------------------- #js const clock = document.querySelector(".clock"); const clockTitle = clock.querySelector("h1"); function getTime() { const date = new Date(); const hours date.getHours(); const minutes = date.getMinutes(); const seconds = date.getSeconds(); clockTitle.innerText = `${hours < 10 ? `0${hours}`:hours} : ${minutes ..