title: How to match list items with values in an array
body: <p>I have an array, it contains values [1,2].
  I also have an html list</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li id="1"&gt;List Item 1&lt;/li&gt;
  &lt;li id="2"&gt;List Item 2&lt;/li&gt;
  &lt;li id="3"&gt;List Item 3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I need to iterate through the array, and if a value in the array matches an ID in my list, add a class to the list item. </p>
  
  <p>The output example would be</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li id="1" class="active"&gt;List Item 1&lt;/li&gt;
  &lt;li id="2" class="active"&gt;List Item 2&lt;/li&gt;
  &lt;li id="3"&gt;List Item 3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I'm a bit lost on this one, thanks in advance!</p>