Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `toggleChecked(list, id)` returning a new list with the `checked` flag flipped on the item whose `id` matches.
+ 1 hidden test run on Submit.
map returns a new list where only the item with the given id gets a new object with checked flipped, leaving the rest by reference.
Run your code to see results.