Deep clone an object using structured cloning
Object to clone
Deep cloned object
const original = { a: 1, b: { c: 2 } }const cloned = deepClone(original)cloned.b.c = 3original.b.c // still 2 Copy
const original = { a: 1, b: { c: 2 } }const cloned = deepClone(original)cloned.b.c = 3original.b.c // still 2
Deep clone an object using structured cloning