{"size": 568, "ext": "js", "max_stars_repo_path": "bootcamp_activities/activities04.3/21-Ins_Local-Storage/assets/js/script.js", "max_stars_repo_name": "ristjosh/Homeowrk-9", "max_stars_repo_stars_event_min_datetime": "2019-01-17T01:00:49.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T00:48:08.000Z", "max_issues_repo_path": "bootcamp_activities/activities04.3/21-Ins_Local-Storage/assets/js/script.js", "max_issues_repo_name": "ristjosh/Homeowrk-9", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "bootcamp_activities/activities04.3/21-Ins_Local-Storage/assets/js/script.js", "max_forks_repo_name": "ristjosh/Homeowrk-9", "max_forks_repo_forks_event_min_datetime": "2018-08-13T23:33:38.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-01T16:04:40.000Z"}
{"max_stars_count": 16, "max_issues_count": null, "max_forks_count": 35, "avg_line_length": 23.6666666667, "max_line_length": 57, "alphanum_fraction": 0.6813380282}
var counter = document.querySelector("#counter");
var addButton = document.querySelector("#add");
var subtractButton = document.querySelector("#subtract");

var count = localStorage.getItem("count");

counter.textContent = count;

addButton.addEventListener("click", function () {
  if (count < 24) {
    count++;
    counter.textContent = count;
    localStorage.setItem("count", count);
  }
});

subtractButton.addEventListener("click", function () {
  if (count > 0) {
    count--;
    counter.textContent = count;
    localStorage.setItem("count", count);
  }
});
