Here is the working version
You are given an application with a counter and three buttons. Your task is to implement the logic for updating the counter.
- Calls
addOne - Increases the counter by 1
- Calls
add100 - Increases the counter by 100
Increasebutton first checks the currentcountvalue:- if the current value is divisible by
5, it first callsadd100; - after that, it always calls
addOne.
- if the current value is divisible by
- The condition must be checked after incrementing the counter by 1.
- The
increasefunction is already implemented and must not be changed.
Count: 0
- Install Prettier Extesion and use this VSCode settings to enable format on save.
- Implement a solution following the React task guideline.
- Open one more terminal and run tests with
npm testto ensure your solution is correct. - Replace
<your_account>with your Github username in the DEMO LINK and add it to PR description.