For multiple query matches, we use this which returns a NodeList which is essentially and array.

Function:

  • It takes a single argument, which is a CSS selector string, similar to document.querySelector.
  • Return Value: It returns a NodeList, which is a live collection of all the elements in the DOM that match the specified CSS selector.