A

Admin • 833K Points
Coach

Q. Which DOM method returns the first element that matches a selector?

  • (A) querySelector()
  • (B) querySelectorAll()
  • (C) getElementById()
  • (D) getElementsByTagName()
  • Correct Answer - Option(A)
  • Views: 19
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

querySelector returns the first element matching a CSS selector.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.