Tell us what’s happening:
I don’t know what I’m missing for this to work I thought calling the updateScore function would update the totalScoreFunction but that doesn’t seem to b working
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
keepScoreBtn.addEventListener("click", () => {
const selectedOption = document.quearySelector('input[name="score":checked');
if (selectedOption) {
const value = selectedOption.value;
const id = selectedOption.id;
updateScore(value, id);
resetRadioOptions();
scoreHistory.innerHTML += `<li>Round ${round}: ${id} - ${value}</li>`;
round++;
rolls = 0;
updateStats();
} else {
alert("Please select an option.");
}
})
// 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