Given this HTML: - Apples
- Pears
- Bananas
-
Posted: Fri Jul 08, 2022 6:45 am
Given this HTML: <ul> <li id="one">Apples</li> <li id="two">Pears</li> <li id="three" class="special">Bananas</li> <li id="four">Oranges</li> </ul> and this javascript acting on this HTML: myEl document.querySelector ("ul"); What property of myEl would you use to access the first list item (<li>)? O this getFirstChild() O myEl.nodes[0] O myEl.getChildren()[0] O myEl.firstElementChild
Posted: Fri Jul 08, 2022 6:45 am
Given this HTML: <ul> <li id="one">Apples</li> <li id="two">Pears</li> <li id="three" class="special">Bananas</li> <li id="four">Oranges</li> </ul> and this javascript acting on this HTML: myEl document.querySelector ("ul"); What property of myEl would you use to access the first list item (<li>)? O this getFirstChild() O myEl.nodes[0] O myEl.getChildren()[0] O myEl.firstElementChild