var buttons = document.querySelectorAll('button');
var span = document.querySelectorAll('.counter');
for (var i = 0; i < buttons.length; i++) {
buttons[i].addEventListener('click', function (event) {
span[i].innerText = parseInt(span[i].innerText) +1;
});
}
the inner span doesnt "see" the same [i] i use for buttons. the console returns "not defined" any suggestions on how to fix that problem?