https://stackoverflow.com/questions/42477001/counting-the-number-of-times-a-button-is-pressed

var $ = function (id) { return document.getElementById(id); }; var counter; function start(){ var button = document.getElementById("button"); window.addEventListener("click", count, false); }; function count(){ counter = document.getElementById("counter"); counter = counter+1; document.getElementById("count").innerHTML = counter; }; window.addEventListener("load", start, false);
12.5 valenti

count: 0