title: Count to 100 using Javascript (in a div)
body: <p>I wanne count to 100 in a div only using javascript. Why does only comes the last number.</p>
  
  <p>Here is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function test() {
   for (var x = 1; x &lt; 101; x++) {
    document.getElementById("demo").innerHTML = (x + "&lt;br /&gt;");
   }
  }function leer() {
   document.getElementById("demo").innerHTML = "Delete"
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="function.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;button type="button" onclick="test()"&gt;100&lt;/button&gt;
  &lt;button type="button" onclick="leer()"&gt;Delete&lt;/button&gt;
  &lt;div id="demo"&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>