About Lesson
The replaceChild() method in HTML DOM is used to replace a child node with a new node within the given parent node.
Syntax:
parentNode.replaceChild( newChild, oldChild);
The removeChild() method in HTML DOM is used to remove a specified child node of the given element. It returns the removed node as a node object or null if the node doesn’t exist.
Syntax:
node.removeChild(child);
Exercise Files
No Attachment Found
Join the conversation