HTML DOM Element cloneNode()
HTML DOM Element cloneNode() Method
The cloneNode() method is used for creating copies of a node and returning it. It clones all of its attributes and values. By setting its deep parameter to true, it will clone its children.
Its syntax is:- node.cloneNode(deep)
Its return is:- cloned node