title: Filling arrays equally
body: <p>given 2 arrays (with max length of lets say 15):</p>
  
  <pre><code>var a = [1,2,3];
  var b = [5,6,7,8,9,10,11,12];
  var data = [13,14,15,16,17,18,19,20,21,22,23,24,25,26];
  </code></pre>
  
  <p>what would be the best approach to "fill" arrays <code>a</code> and <code>b</code> equally with the data from <code>data</code> array, so they both be the same length (or as close to it) but not exceed max length?</p>
  
  <p>required result <em>could</em> look like this:</p>
  
  <pre><code>var a = [1,2,3,13,14,15,16,17,18,19,20,21];
  var b = [5,6,7,8,9,10,11,12,22,23,24,25,26];
  </code></pre>
  
  <p><hr>
  <em>my situation is more complex, and I'm looking for an efficient way: I have 2 sides on the screen, each side might have profile photos of ppl from FB. if there aren't enough photos in one side, I need to add "fake" photos to fill it, so both sides will look more or less evenly filled with photos</em></p>