js find childs index number code example
Example 1: js get node index
Array.from(element.parentNode.children).indexOf(element)
Example 2: js get node index
[...element.parentNode.children].indexOf(element);
Array.from(element.parentNode.children).indexOf(element)
[...element.parentNode.children].indexOf(element);