When using querySelectorAll, the returned object is a _______.

  • NodeList
  • HTMLCollection
  • Array
  • Element
When you use querySelectorAll, it returns a NodeList. A NodeList is a collection of DOM elements that match the specified selector. Unlike an HTMLCollection, a NodeList is not live, which means it won't change dynamically as the document does.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *