Course · Section 17: Modern JavaScript Development: Modules, Tooling, and Functional · Lecture 294: Declarative and Functional JavaScript Principles
Implement `applyActions(initial, actions)` folding a list of `{ type }` actions (`inc` or `dec`) over a counter starting at `initial`.
+ 1 hidden test run on Submit.
Folding the action list with reduce applies each inc or dec in order, mirroring how a useReducer would process a sequence of dispatches.
Run your code to see results.