// a spread copy still SHARES nested objects const config = { limits: { max: 10 } }; const shallow = { ...config }; shallow.limits.max = 99; // the original sees the change console.log(config.limits.max);
a spread copy still shares inner objects