title: Update number in same place on web page with javascript
body: <p>Is there a way to make JavaScript print a counter continuously in the same place on the page?</p>
  
  <pre><code>for(var x=0; x&lt;3000; x++){
      document.write(x + '&lt;/br&gt;');
      document.body.innerHTML = "";
  }
  </code></pre>
  
  <p>I want the number x to update and replace the previous number, however this code seems to wait until the loop is finished before showing a number (by then it is too late)</p>
  
  <p>Is there a way to say, print number x, now wait 100ms, now clear and update in the same space the new value for x, and repeat?</p>
  
  <p>(I know that the <code>innerHTML</code> is killing the whole page, for now all this pages needs to do is run a counter, so other elements are irrelevant. What I don't want is a printed list of all those numbers, and I need a delay)</p>
  
  <p>Thanks!</p>