title: How to find index of element in collection without jquery
body: <p>I have a collection of elements in a div</p>
  
  <p>lets say:</p>
  
  <pre><code>&lt;div&gt;
    &lt;p id="one"&gt;one&lt;/p&gt;
    &lt;p id="two"&gt;two&lt;/p&gt;
    &lt;p id="three"&gt;three&lt;/p&gt;
    &lt;p id="four"&gt;four&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>now I am looking for a simple way of finding the index of lets say the third element like this:</p>
  
  <pre><code>document.getElementById("three").index();
  </code></pre>
  
  <p>this should return an integer with the value of 2 since this element is the third</p>
  
  <p>i know there is somehing like this in jquery but i would love plain js</p>