100 JS Functions

Beginner

1. CurrentYear

2. SimpleCounter

3. DoubleNumber

4. CreateColor

5. DynamicGrid

6. DynamicPictureSize

7. RandomButton

8. TabbedNavigation

9. MathOperator

10. GuessTheNumber

11. BetweenDates

12. Reactions

13. FeedTheBunny

14. Countdown

15. ClickFast

16. SkillsForJobs

17. UsersTabel

18. TodoList

19. UserSearch

20. SpendingInfo

2.SimpleCounter

Write a component named <SimpleCounter> that will be used to increment and decrement a numeric value, that starts at 0.

The component should render:

  • 2 buttons: one with the text "Plus" and one with the text "Minus"
  • a value, starting at 0

When clicking the "Plus" button, the value should be increased by 1. When clicking the "Minus" button, the value should be decreased by one.

Example 1

Input

No input props

Demo

Open demo in new window

You'll see test results here!