My code do not pass.
Step 59
If the user makes a selection, then the rounds, rolls and scores
should be updated.
Add an if statement, to check if selectedValue is truthy.
If so, reassign the number 0 to rolls and increment round by 1.
Then, call the updateStats and resetRadioOption functions.
And lastly, call the updateScore function and
pass in selectedValue and achieved for the arguments.
Now you should be able to roll the dice,
make a selection keep a score and have the score
display under the score history.
My code is :
if (selectedValue) {
rolls = 0;
round += 1;
updateStats();
updateScore(selectedValue, achieved);
}
The following error text appears in the console:
// running tests
You should increment round by 1
You should call the updateStats
and resetRadioOption
functions.
You should call the updateScore function and pass in
selectedValue and achieved for arguments.
// tests completed
I can not find any errors in my code,
How can I continue?