Which of the following is the method used to add an element to the desired location?
A
add.element()
B
element.add()
C
element.appendChild()
D
addelement()
Correct Answer: element.appendChild()
The method element.appendChild() is used to add the element to the desired location within the document tree. The appendChild() method appends a node as the last child of a node.