title: JavaScript: for loop append element in several places
body: <p>I have a for loop that needs to append a list item to two menus sharing the same class name.  The problem is it will only append to one or the other if I reference the index of it or if I use index of I it will only append to the last item.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;ul class="menu"&gt;
  &lt;li&gt;List One&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;ul class="menu"&gt;
  &lt;li&gt;List Two&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>var menu    = document.querySelectorAll('.menu');
  var listItem    = document.createElement('li');
  
  for(i=0; i &lt; menu.length; ++i){
      menu[i].appendChild(listItem);
  }
  </code></pre>
  
  <p>Is this another weird quirk of JS or am I just missing something?</p>