/js_all-is-counted-DOM

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

All is Counted

Task

  1. Create a page that would display the number of times the user clicked on it. It will start by displaying 0, after the first click anywhere on the page it will replace 0 with 1, after another click it will show 2 and so on.

  2. Modify the counter so that it does not reset if the user refreshes the page: after each refresh, the initial number of clicks the user sees is the number of times he has already clicked on the page. The counter then increases by 1 upon every click, just as it did before. The counter, however, should reset to 0 after the page is closed and reopened.


Read the guideline before start

Guideline

Result