title: IndexOf element in array
body: <p>I try to get index from array of elements. </p>
  
  <pre><code> var arr = document.getElementsByClassName('class'); //3 elements
  
   console.log(arr);
   output// [div.class.selected, div.class, div.class, item: function, namedItem: function]
  
   var selected = document.getElementsByClassName('selected');
   var selected_id = arr.indexOf(selected[0]); 
  </code></pre>
  
  <p>The last line of code give me an error <code>Uncaught TypeError: undefined is not a function</code>.
  I also tried to add <code>toString()</code> and search, but the same error.</p>