Create a very basic counter program with reset and increment functionality.


Very easy


A counter is simply a program where we have a number, known as the count, that could be incremented with the help of some increment button, and then reset back to 0, again with the help of a reset button.

It's literally as if we are 'counting' numbers using the counter, hence the word 'counter'.

Counter programs are really common and really easy to develop, be that in any JavaScript UI library/framework. Equally, they're also a very nice way to brush up one's understanding of the library/framework without having to overcomplicate ideas and improvise a lot in the code.

In this exercise, you have to create an elementary counter with two functionalities:

  1. Increment it by 1.
  2. Reset it all the way back to 0.

The structure of the counter should be as follows: an <h1> must showcase the current count, a <button> should represent the reset button while another one should represent the increment button.

And that's it.

Here's a demonstration of what your final result should look like: