Selecting element from a array on click. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Selecting element from a array on click.

Is there a way I can get the index of a html element from a array with items of the same class, like document.getElementsByClassName() when I click the element?

14th Sep 2020, 6:54 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
2 Answers
14th Sep 2020, 7:14 AM
777
777 - avatar
0
It worked, thanks @Vrintle !
14th Sep 2020, 7:31 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar