Which of these creates a shallow copy of an object?
- A const copy = original;
- B const copy = {...original};
- C const copy = structuredClone(original);
- D const copy = Object.freeze(original);
Answer
const copy = {...original};
Spread copies only the top level, so nested objects remain shared. Direct assignment creates another reference to the same object, not a copy.





