title: Dynamically add bootstrap rows using modulo
body: <p>I a trying to dynamically add rows and populate them with 3 <code>col-sm-4</code> using a modulo against the number of objects in a returned object from a function.</p>
  
  <p><strong>Code</strong>:</p>
  
  <pre><code> function formatSeriesCard(series) {
      var card = "";
  
      console.log(countProperties(series));
  
      for (var i=0; i &lt; countProperties(series); i++) {
  
      if (i % 3 == 0 ) {
          card += "&lt;div class=\"row\"&gt;";
      }
  
      card += "&lt;div class='col-sm-4' data-id="+i+"&gt;";
      card +=     "&lt;div class='action-box'&gt;";
      card +=         "&lt;h4&gt;" + '"' + series.name + '"' + "&lt;/h4&gt;";
      card +=         "&lt;p&gt;";
  </code></pre>
  
  <p>Instead I'm getting each row nested within the previous. Thinking I need to test for the first one and last one. Thanks.</p>