title: Rotate clock hand using vanilla js
body: <pre><code>&lt;div class="clock"&gt;
  &lt;div class="space"&gt;
  &lt;div class="hourhand"&gt;&lt;/div&gt;
  &lt;div class="minutehand"&gt;&lt;/div&gt;
  &lt;div class="sechand" id="secc"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>function date(){
    var d = new Date();
    const sec= d.getSeconds();
    var x = document.getElementById('secc');
    x.style.transform="rotate(sec)";
    console.log(sec);
  }
  setInterval(date, 1000);
  </code></pre>
  
  <p>I am making this simple clock using vanilla js.(I have not shown the CSS code).
  The line in script tag - <code>x.style.transform</code> does not take <code>sec</code> as its input?
  Then how should I pass the <code>sec</code> value to this to make it rotate?</p>