Vidyalelo
JavaScript · Q120

Document Object Model And Event Handling

Programming · JavaScript · question 120

Q120

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

A.
compareDocumentPosition()
Answer
B.
cloneNode()
C.
getUserData()
D.
getFeature()

Answer: Option A

Solution

Answer: Option A
Solution:
The compareDocumentPosition() method is used to compare the placement of two nodes in the DOM hierarchy (document).