Obtenha o índice de nós filhos
Array.from(element.parentNode.children).indexOf(element)
Talented Tiger
Array.from(element.parentNode.children).indexOf(element)
Array.from(element.parentNode.children).indexOf(element)
[...element.parentNode.children].indexOf(element);