Tell us what’s happening:
I think my code is accurate I’ve met all the steps that’s been requested and I’ve searched the internet for solutions but can’t seem to get pass this and I think this is a bug or something… I keep getting this message
- When your keepScoreBtn is clicked, the score History should be updated.
which I’m doing in the updateScore function. and passing it to the eventlistener but I keep getting the same error
const achieved = "Achieved"
updateScore(selectedValue, achieved)
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
keepScoreBtn.addEventListener('click', () => {
const selectedRadio = document.querySelector('input[name="score-options"]:checked');
if(!selectedRadio){
alert("Please select a score option!");
return;
}
const selectedRadioValue = selectedRadio.value;
totalScoreElement.textContent = selectedRadioValue;
const achieved = "Achieved";
updateScore(selectedRadioValue, achieved);
resetRadioOptions();
});
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 10