FrontendArk

Master Frontend Interviews

  • Practice
  • Playground
  • Resource
Easy

useCounter Function

10 mins

Create a utility function called useCounter that helps you manage a numeric counter. It should provide methods to increase, decrease, reset, and directly set the counter value.

Code Editor

JavaScript Function

00:00
Loading...

Test Cases

No test results yet

Click "Run" to execute tests