Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `toggleField(state, key)` returning a new object with the boolean at `key` flipped.
+ 1 hidden test run on Submit.
Negate the current value and return it in a new object, the immutable way to flip a boolean flag in state.
Run your code to see results.