Message from JavaScript discussions

January 2019

— It's very valuable


What should this if statement mean? (menuItem is a <li> element and menuItem.parentNode is a <ul> element)

— It searches its index

— ?

— The question is what is the index of menuItem node

— He is not looking for the index

— Yes he is

— I have already tested the code but nothing comes out

— Put a break instead of continue

— The if statement should mean "if menuItem is child of menuItem.parentNode ignore it and move on" but I did not get this by testing the code

Message permanent page

— If you access parent, using reference child.parentNode, child is always a child

— My doubt is that I have to turn it into jquery code and I do not know how to move