DEV Community

Discussion on: Select an Element with document.querySelector

Collapse
 
tobymosque profile image
Tobias Mesquita • Edited

Would be better to say querySeletor expect a css selector, so li + li or ul:nth-child(2) or li:nth-of-type(2) would work.

Collapse
 
theianjones profile image
Ian Jones

Thanks for the feedback! I appreciate it.