Review Algorithmic Thinking by Building a Dice Game - Step 10

Tell us what’s happening:

The code does whats supposed to do: It updates the score, the score history and resets the radio buttons.
But still, it gaves me this console error: “3. When your keepScoreBtn is clicked, the score history should be updated.”
I need help please

Your code so far

<!-- file: index.html -->

/* file: script.js */
// User Editable Region

keepScoreBtn.addEventListener("click",()=>{
  const scoreInputsArr = Array.from(scoreInputs);
  if(!scoreInputsArr.some((input)=>input.checked)){
    alert("Please select a score option before proceeding.");
    return;
  }
  const checkedIndex = scoreInputsArr.findIndex((input) => input.checked);
  const selectedValue = scoreInputsArr[checkedIndex].value;

  const achievables = [
    "Three of a kind",
    "Four of a kind",
    "Full house",
    "Small straight",
    "Large straight",
    "None of the above",
  ];
  const achievedLabel = achievables[checkedIndex];


  updateScore(selectedValue, achievedLabel);
  resetRadioOptions();
  round++;
  rolls = 0;
});

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 10

I haven’t looked at this challenge, so I’m not sure how you are supposed to know it or why it is this way, but the text has to be lower case hyphenated, as the tests is expecting three-of-a-kind for the text.

Yes, minutes after I created this post I tried just putting just the ID as the “achivedLabel” and it worked. Thanks!