Tell us what’s happening:
I think that I have the right code, but the system keeps telling me “Your updateStats function should update the currentRoundRolls element with the correct value.” Please help
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const updateStats = () => {
currentRoundRollsText.textContent = rolls;
currentRoundText.textContent = round;
}
rollDiceBtn.addEventListener("click", () => {
if (rolls === 3) {
alert("You have made three rolls this round. Please select a score.");
} else {
rolls++;
rollDice();
updateStats()
}
});
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 5