title: JQuery countdown timer with milliseconds
body: <p>I have a very basic lightweight function that counts down from 30 seconds. I have been trying to add milliseconds to it but I can't seem to get it to work correctly.</p>
  
  <pre><code>var count = 30;
  var counter = setInterval(timer, 1000); //1000 will  run it every 1 second
  
  function timer() {
      if (count &lt;= 0) {
          clearInterval(counter);
          return;
      }
      count = count - 1;
      document.getElementById("timer").innerHTML = count + " secs"; // watch for spelling
  }
  </code></pre>