title: logic question on placing two items in a for loop?
body: <p>this is a logic question, im programming in javascript:</p>
  
  <p>scenario: i have a database that holds 20 images, and im going through all of them one by one using a for loop.</p>
  
  <pre><code>for (var i = 0; i &lt; 20; i++) {
  
  //logic
  
  }
  </code></pre>
  
  <p>what im trying to do for every two images retrieved add them to 1 row</p>
  
  <p>2 image = 1 row</p>
  
  <p>and the next 2 images put them in one and so on and so forth.....</p>
  
  <p>but i dont understand how i could this, espcially when one image is being retrieved at one timee each.. i hope you can help me thanks</p>