let index = 0;
const btnLeft = function(index){
console.log('left', index--);
};
const btnRight = function(index){
console.log('right', index++);
};
left.addEventListener('click', btnLeft);
right.addEventListener('click', btnRight);
why I got NaN instead of 1,2,3 or 0,-1