document.querySelector('p') will select the _________
element in the HTML document.
- first
- last
- random
- first matching
document.querySelector('p') will select the first
element in the HTML document that matches the selector. If multiple
elements exist, it selects the first one it encounters in the document's order.
Loading...
Related Quiz
- To handle both resolve and reject in a single method, you can use the .finally method after a(n) _______ block in asynchronous functions.
- You are reviewing a junior developer's code and see the following line var x = 10;. You want to advise them to use a declaration that maintains block scope, which keyword should they use instead of var?
- The createElement method is used to create a new element in the _________.
- Which of the following JavaScript methods can create a new HTML element?
- You're debugging a JavaScript application and notice unexpected behavior in the manipulation of an array. The items are not being removed correctly using a method, and it turns out the array is not being modified at all. Which array method might be mistakenly being used?