Q. Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?

  • (A) compareDocumentPosition()
  • (B) cloneNode()
  • (C) getUserData()
  • (D) getFeature()
πŸ’¬ Discuss
βœ… Correct Answer: (A) compareDocumentPosition()
Explanation: The compareDocumentPosition() method is used to compare the placement of two nodes in the DOM hierarchy (document).
Explanation by: Mr. Dubey
The compareDocumentPosition() method is used to compare the placement of two nodes in the DOM hierarchy (document).

πŸ’¬ Discussion


πŸ“Š Question Analytics

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