title: JavaScript Analog Clock
body: <p>I was creating a Analog Clock using javascript for practice and went through a code but I am not able to understand why we need to divide second by 60, min+sec/60 and and hour+min/12 could you please make me understand how this algorithm works? my code is </p>
  
  <pre><code>const hour = document.getElementById('hour');
  const minute = document.getElementById('minute');
  const second = document.getElementById('second');
  
  setInterval(updateClock,1000);
  
  function updateClock() {
  let date = new Date()
  let sec = date.getSeconds()/60
  
  let min = (date.getMinutes() + sec) / 60;
  
  let hr = (date.getHours() + min) / 12;
  
  
  hour.style.transform = "rotate(" + (hr * 360) + "deg)";
  minute.style.transform ="rotate(" + (min * 360) + "deg)";
  second.style.transform = "rotate(" + (sec * 360) + "deg)";
  }
  updateClock()
  </code></pre>