Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `updateNested(state, path, value)` where `path` is an array of keys, returning a new object with the nested value replaced and no mutation of the original.
+ 1 hidden test run on Submit.
Each level returns a new object that spreads its siblings and replaces only the one child on the path. Recursing to the leaf and rebuilding every parent keeps the whole path immutable.
Run your code to see results.