Review Algorithmic Thinking by Building a Dice Game - Step 9

Tell us what’s happening:

I couldn’t think of anything that can cause the error and I don’t understand why my code doesn’t pass. I thought it is a completed code.

Your code so far

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

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

let totalScore = 0;
function updateScore(selectedValue, achieved) {
  const value = parseInt(selectedValue);
  totalScore += value;
  totalScoreElement.textContent = totalScore;
  scoreHistory.innerHTML += `<li>${achieved} : ${selectedValue}</li>` 

  selectedValue = 1;
  parseInt(selectedValue);
}

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

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 9

you should not create a new variable here, update the existing variable that holds the total score