I try to increase h4 which is count.innerHTML when click to button. There are 3 buttons, how can I manipulate them, and what is wrong with that code?
var btnInc = document.querySelectorAll(".inc");
var count = document.querySelectorAll(".count");
var num = 0;
for(var i=0; i<btnInc.length; i++) {
btnInc[i].addEventListener('click', function(){
count[i].innerHTML=num;
num++;
})
}