Review Algorithmic Thinking by Building a Dice Game - Step 10

Tell us what’s happening:

somehow my code isn’t updating the totalScoreElement can anyone help me with why its not and help me fix it so it does

Your code so far

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

/* file: styles.css */

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

keepScoreBtn.addEventListener("click", () => {
  const selectedOption = document.querySelector("#score-options input:checked");

  if (selectedOption) {
    const selectedValue = selectedOption.value;
    const selectedId = selectedOption.id;
    
    const achieved = document.querySelector(`#${selectedId} + span`).textContent;

    updateScore(selectedValue, achieved);
    resetRadioOptions();
    round++;
    rolls = 0;
    updateStats();
  } else {
    alert("Please select the score you wish to keep")
  }
});

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 10

I’m in this situation, and pressing the keep the score button


but nothing happens

what do you think is the part of your code that would update the total score?