Examveda
Examveda

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

A. compareDocumentPosition()

B. cloneNode()

C. getUserData()

D. getFeature()

Answer: Option A

Solution(By Examveda Team)

The compareDocumentPosition() method is used to compare the placement of two nodes in the DOM hierarchy (document).

Join The Discussion

Related Questions on Document Object Model and Event Handling