Writing this jQuery click function in JavaScript
<p>I am slowly making my way from jQuery to vanilla JS, but I am struggling with wanting to write the following in JavaScript, would I have to setup a 'for' loop for each element? How would I target the child elements an an ID?</p>

<p>Here's what I would want to understand:</p>

<pre><code>$('#id li').click(function(){
    $(this).addClass('active');
});
</code></pre>

<p>I understand document getElementById to grab the '#id' but how would I achieve getting the child &lt;li&gt; elements? And how would I get the 'onclick' function to work for ANY list element clicked? Would I have to setup a 'for' loop for each element? Any help much appreciated!</p>
