Which 'li' was clicked using vanilla JS : <p>I have some li elements:</p>

<pre><code>&lt;ul&gt;
  &lt;li&gt;One&lt;/li&gt;
  &lt;li&gt;Two&lt;/li&gt;
  &lt;li&gt;Three&lt;/li&gt;    
&lt;/ul&gt;
</code></pre>

<p>I need to know the number of the element that was clicked. For example, if an user clicks on </p>

<pre><code>&lt;li&gt;Three&lt;/li&gt;
</code></pre>

<p>my output will be "3". </p>

<p><br>
How can I get this result using vanilla JavaScript?</p>
