function direction(item) { const increment = item.classList[1] === "decrease" ? counter-- : item.classList[1] === "increase" ? counter++ : item.classList[1] === "reset" ? (counter = 0) : counter; return increment; }
function direction(item) { const increment = item.classList[1] === "decrease" ? counter-- : item.classList[1] === "increase" ? counter++ : item.classList[1] === "reset" ? (counter = 0) : counter; return increment; }