title: Adding different list items to array of unordered lists
body: <p>I have three unordered lists that have the same class. I loop through them and I'm trying to add items that match certain descriptions to each of them, but when I try to reference the list by its index, it says it can't find the append function. The code looks something like this:</p>
  
  <pre><code>demoTypes.upcomingDemos.map(function(item) {
      var itemElement = "&lt;li&gt;My Item&lt;/li&gt;";
      if (demoTypes.type == "Basic") {
          $(".unorderedListSection")[0].append(itemElement);
      } else if (demoTypes.type == "Intermediate") {
          $(".unorderedListSection")[1].append(itemElement);
      } else if (demoTypes.type == "Advanced") {
          $(".unorderedListSection")[2].append(itemElement);
      }
  
  });
  </code></pre>
  
  <p>Adding the items to ALL the lists seems to work fine for some reason (although I obviously don't want to do this):</p>
  
  <pre><code>$(".unorderedListSection").append(itemElement);
  </code></pre>