Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 6

Tell us what’s happening:

i keep getting reset game function should set the playerscore to 0 but i already did it , help

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function resetGame() {
 playerScore = 0;
 computerScore = 0;
 playerScoreSpanElement.innerText = playerScore;
 computerScoreSpanElement.innerText = computerScore; = "none"; = "block";
 roundResultsMsg.innerText= "";
 winnerMsgElement.innerText = "";


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 6

Update both SpanElement.innerText to 0;

still not working ,it says the same thing

Why? Have you looked at the function to see what the value for playerScore and computerScore are at the beginning of the function? the variables already have the value 0 at the beginning of the function. So, what they are doing here is fine

Can you share all the code of the entire challenge because this function passes the challenge for me

1 Like

Because for me it worked.

Hi @suad1

  • Resets the player and computer scores to 0.
  • Updates the playerScoreSpanElement and computerScoreSpanElement to display the new scores.

Setting the variables to 0, and either setting the .innerText properties to 0 or the updated score variables both work.

Try looking at the console for any messages.

Otherwise reset the step and try again. If that doesn’t work, refresh the page, disable dark mode, disable ad blockers. Or, use another browser.
If the above steps do not work, you may need to restart the computer.

Happy coding