title: I work on digital clock project with Javascript and I have this issue, I want to call function in every 1 second but, setinterval doesnt work
body: <p><strong>here is my javascript code I didnt include HTML file because everything is simple.
  time is displayed on webpage but seconds doesn't work</strong></p>
  <pre><code>const hour = document.querySelector(&quot;.hour&quot;);
  const minute = document.querySelector(&quot;.minute&quot;);
  const seconds = document.querySelector(&quot;.seconds&quot;);
  const timeZone = document.querySelector(&quot;.timeZone&quot;);
  
  const date = new Date();
  
  setInterval(setTime, 1000);
  
  function setTime() {
    hour.innerHTML = date.getHours() + &quot; : &quot;;
    minute.innerHTML = date.getMinutes() + &quot; : &quot;;
    seconds.innerHTML = date.getSeconds();
  }
  
  setTime();
  </code></pre>