title: create multiple divs using a for loop
body: <p>This is a really simple question but I don't know why it doesn't work.
  I have an array with 3 items inside. And I have a container which I would like to insert a number of divs based on the number of items in my array. I used a for loop for this but it is only creating one div. Should it not create 3?</p>
  
  <pre><code>for (var i = 0; i &lt; array.length; i++) {
     var container = document.getElementById("container");
     container.innerHTML = '&lt;div class="box"&gt;&lt;/div&gt;';
  }
  </code></pre>
  
  <p>here is a fiddle to demonstrate further <a href="https://jsfiddle.net/nfjkta02/" rel="noreferrer">fiddle</a></p>