I don’t know why this is not passing the test. When the button is clicked, the count is increment by 1 as it should be. Can please someone help me?
const happyBtn = document.querySelector("#happy-btn");
function counting() {
const countEl = happyBtn.querySelector(".count");
let currCount = +countEl.textContent.split("/")[0];
return function() {
if (currCount < 10) {
currCount++;
countEl.textContent = currCount.toString() + "/10";
}
}
}
happyBtn.addEventListener("click", counting());