answered 2023-05-28 22:00:02 +0000
You can use the direct child selector (>) to only select the immediate children of an element. For example, if you want to select all the
const listItems = document.querySelectorAll("ul > li");
This will only select the