Build an Emoji Reactor step 10

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());

please share a link to the challenge

https://www.freecodecamp.org/learn/full-stack-developer/workshop-emoji-reactor/step-10

you have changed too much, reset the step, add the logic to change the current count inside what is already there, do not create counting

1 Like

It should be more clear that they want you to change the type of variable “currCount” is