Course · Section 8: How JavaScript Works Behind the Scenes · Lecture 104: Object References in Practice (Shallow vs. Deep Copies)
Implement `copyWith(obj, key, value)` returning a shallow copy of `obj` with `key` set to `value`, without mutating the original.
+ 1 hidden test run on Submit.
Spreading creates a new top-level object; nested values would still be shared references.
Run your code to see results.