I use vanilla javascript, no jQuery.
In my code I have something that looks like this:
item.closest('ul').closest('li').closest('ul').classList.add('active');
While it works, it does not look that nice. I repeat closest
three times.
Is it possible to so something smarter in this case?