SyntaxFix
Write A Post
Hire A Developer
Questions
With native JavaScript:
newelement = element.cloneNode(bool)
where the Boolean indicates whether to clone child nodes or not.
Here is the complete documentation on MDN.