title: map array to elements text using jQuery.each inside a for loop?
body: <p>for the given html:</p>
  
  <pre><code>&lt;div id="parent"&gt;
      &lt;div class="child"&gt;x&lt;/div&gt;
      &lt;div class="child"&gt;y&lt;/div&gt;
      &lt;div class="child"&gt;z&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I map the text of its children from an array?</p>
  
  <p>This is my try:</p>
  
  <pre><code>var myArray = ['a', 'b', 'c'];
  
  for (var i = -1; i &lt; myArray.length; i++) {
      $('#parent .child').each(function () {
          $(this).text(myArray[i]);
      });
  }
  </code></pre>
  
  <p>I get: <code>c,c,c</code></p>
  
  <p>How can I get <code>a,b,c</code> ?</p>