title: Is it possible to find index of a class from a collection of elements with same class name using javascipt
body: <pre><code>const bubbleBtns = document.querySelectorAll(&quot;.btn&quot;);
  
  bubbleBtns.forEach( btn =&gt; 
      btn.addEventListener('click', btn =&gt; {
          console.log(btn.index);
      }));
  </code></pre>
  <p>This is the code snippet. Is there some method to get index of the specific element.
  Any help is appreciated.</p>