Tell us what’s happening:
please give update Score solution mySol donotWORK
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const updateScore = (selectedValue,achieved) => {
total += parseInt(selectedValue);
}
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 9
hi and welcome to the forum!
It is our policy not to share solutions here but we are happy to help you answer a programming question if you need help with the step.
(please tell us what you are struggling with for example)
Hi Abdullah,
I hope you are doing well.
I wanted to address a few points regarding the score management implementation:
- The
score
variable is already declared on line 15, so have to write instead of total
.
- Please ensure that the
textContent
of totalScore
is set to the value of score
.
- Additionally, update the
innerHTML
of scoreHistory
to include the following format: <li>${achieved} : ${selectedValue}</li>
.
Thank you for your attention to these changes.
Best regards,
Yashi
1 Like