Only last execution of $.each seems to be executing
<p>Here's the code:</p>

<pre><code>// Each ul that holds the collection of our entities
var lists = ['ul.emails', 'ul.phoneNumbers'];

// Setup the "add" link
var $addLink = $('&lt;a href="#" class="margin-left btn btn-mini add"&gt;&lt;i class="icon-plus"&gt;&lt;/i&gt;label&lt;/a&gt;');
var $newLinkLi = $('&lt;li&gt;&lt;/li&gt;').append($addLink);

$(document).ready(function() {

  // Add link to each list
  $.each(lists, function(index, list) { 
    $(list).append($newLinkLi);
  });

});
</code></pre>

<p>But, only the last <code>ul</code> gets the link. If, however, I do</p>

<pre><code>  $.each(lists, function(index, list) { 
    $(list).append('test');
  });
</code></pre>

<p>it works. What gives? Is something being passed by reference?</p>
