javascript Copy const obj={ a: 1, b: { c: 2 } } const clone = {...obj}; // creates a shallow copy obj.b.c =5; console.log(clone.b.c); ...
確定! 回上一頁