title: Stop countdown when it reaches to "0"
body: <p>I want to stop this counter when it reaches to 0, can anyone help me?</p>
  
  <pre><code>function countdown() {
      var i = document.getElementById('counter');
      if (parseInt(i.innerHTML)&lt;=0) {
      }
      i.innerHTML = parseInt(i.innerHTML)-1;
  }
  setInterval(function(){ countdown(); },1000);
  </code></pre>