Exploring DOM methods

Report a typo

Match the following DOM methods with their definitions.

Match the items from left and right columns
append()
prepend()
before()
after()
replaceWith()
cloneNode()
adds a node right after the element
adds a node as the last child of the element
replaces an element with the specified node
returns a copy of an element with all its attributes
adds a node right before the element
adds a node as the first child of the element

Create a free account to access the full topic