Open this example in the interactive library
Source code
const original = { tags: ["js"], date: new Date("2026-01-01") };
const copy = structuredClone(original);
copy.tags.push("python");
console.log(original.tags, copy.tags, copy.date.toISOString());
Sample output
[ 'js' ] [ 'js', 'python' ] 2026-01-01T00:00:00.000Z
