title: How to use a JavaScript loop to output an html div element 100 times?
body: <p>How do I output my current div element 100 times using a loop in the function written below? The way I try to do it does not output anything except the div element a single time.</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 printHundredtimes()
    {
      for(i = 0;i&lt;100;i++)
      {
        document.getElementById("firstDiv").innerHTML += "&lt;div id = "firstDiv"&gt;&lt;center&gt;&lt;p id ="paragraph"&gt;Hello, World &lt;/p&gt;&lt;/center&gt;&lt;/div&gt;";
      }
    }
    
    printHundredtimes();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="firstDiv"&gt;
    &lt;center&gt;
      &lt;p id="paragraph"&gt;Hello, World&lt;/p&gt;
    &lt;/center&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>