Course · Section 17: Modern JavaScript Development: Modules, Tooling, and Functional · Lecture 294: Declarative and Functional JavaScript Principles
Implement `useToggle(state, times)` returning the boolean `state` after being toggled `times` times.
+ 1 hidden test run on Submit.
A boolean toggled n times equals the original when n is even and its negation when n is odd, so times % 2 decides the result.
Run your code to see results.