const obj = { a: 1, b: { c: 2 } }
const clone = structuredClone(obj)
clone.b.c = 99
obj.b.c // β 2 (original unchanged)structuredClone() creates a deep clone so modifying the copy does not affect the original.
Use structuredClone() to create a deep copy of a plain object.