title: How to repeat div element n times in HTML?
body: <p>How can I duplicate a <code>&lt;div&gt;</code> so there are n copies using JavaScript?</p>
  
  <p><strong>Start with 1:</strong>
  </p>
  
  <pre><code>&lt;div class="box"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>End up with 5:</strong>
  </p>
  
  <pre><code>&lt;div class="box"&gt;&lt;/div&gt;
  &lt;div class="box"&gt;&lt;/div&gt;
  &lt;div class="box"&gt;&lt;/div&gt;
  &lt;div class="box"&gt;&lt;/div&gt;
  &lt;div class="box"&gt;&lt;/div&gt;
  </code></pre>