create duplicate of node in javascript dom code example
Example: js clone element
// Syntax:
let newClone = node.cloneNode([deep])
// Example:
let p = document.getElementById("para1")
let p_prime = p.cloneNode(true)
// Syntax:
let newClone = node.cloneNode([deep])
// Example:
let p = document.getElementById("para1")
let p_prime = p.cloneNode(true)