Tell us what’s happening:
i don’t understand why the console is saying “Your updateScore function should update the text of the totalScoreElement element”
i even changed it to innerText but it still doesn’t work
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const updateScore = (value, id) => {
const selectedValue = parseInt(value, 10);
score += selectedValue;
totalScoreElement.textContent = `Total Score: ${score}`;
const newHistoryItem = document.createElement('li');
newHistoryItem.textContent = `${id} : ${selectedValue}`;
scoreHistory.appendChild(newHistoryItem);
rolls = 0;
round++;
updateStats();
resetRadioOptions();
};
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 9