title: how to increment a count every seconds
body: <p>I'm trying to develop a stopwatch,But i have problem increment my count using for and while statement please can somebody tel me where am going and help me fix my code,my problem is that once after the interval of time i set it increment from 1 to 10 at one second but i want it to add one every one second.</p>
  
  <pre><code>var count=0;
  var s = 0;
  setInterval(function(){
      while(count &lt; 10){
      $("#mi").html(count);
          count++;
      }
  },1000);
  
  //i also use for but both give did same thing
  setInterval(function(){
      for(count=0;count &lt; 10;count++){
          $("#mi").html(count);
      }
  },1000);
  
  &lt;div id="mi"&gt;0&lt;/div&gt;
  </code></pre>