Q. The return type of getElementsByClassName() is

  • (A) DOM
  • (B) Document
  • (C) Node
  • (D) NodeList
πŸ’¬ Discuss
βœ… Correct Answer: (D) NodeList
Explanation: Like getElementsByTagName(), getElementsByClassName() can be invoked on both HTML documents and HTML elements, and it returns a live NodeList containing all matching descendants of the document or element.
Explanation by: Mr. Dubey
Like getElementsByTagName(), getElementsByClassName() can be invoked on both HTML documents and HTML elements, and it returns a live NodeList containing all matching descendants of the document or element.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
181
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
97%
Success Rate