title: Placing multiple divs in an array in JavaScript
body: <p>So I have a lot of <code>divs</code> in my markup look similar to:</p>
  
  <pre><code>&lt;div class="container"&gt;
     &lt;div class="wrapper"&gt;
        &lt;h3&gt;Title&lt;/h3&gt;
        &lt;p&gt;Some text&lt;/p&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The markup is look <strong>very</strong> messy and i'm fairly new to JS but wondering, if I could place all these divs into an array, then a for loop to iterate over them, then print them. But still have enough control over each div that I can change the background colour on them?</p>
  
  <p>My JS so far:</p>
  
  <pre><code>  var div = {
      divInfo: [
        {
          title: "title",
          description: "Lorem ipsum dolor sit amet, consectetur adipiscing"
        }
      ]
    };
  </code></pre>
  
  <p>I've only shown one div at moment, as i'm still struggling with the for loop.</p>
  
  <p>Any help/suggestions?
  Thanks!</p>