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

Tell us what’s happening:

I’ve been stuck oh this for days. I’ve tried everything. The strange thing is if I build it one line at a time, I don’t get the message about setting the playerScore to 0 until I get to the end of the function. Then the error message comes back. Any help will be greatly appreciated.

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;
  roundResultsMsg.innerText = "";
  winnerMsgElement.innerText = "";
  resetGameBtn = "hide";
  optionsContainer = "block";
};

// 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/130.0.0.0 Safari/537.36

Challenge Information:

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

Your syntax is wrong for toggling between hide and block on your resetGames Btn and optionsContainer. Have a look at the examples here:

Thank you. I changed it to “none”. But I still have the error of " Your resetGame function should set the playerScore to 0 ."

Hi @jfo0707

As mentioned by @a1legalfreelance , the issue is with two other variables.
Have a look at one of your other functions for the syntax.

Happy coding

1 Like

Hi. Changing to “none” on your resetGamesBtn is a good start. However you need to add something further on what the variables of resetGamesBtn and optionsContainer are doing here. You’re missing the relevant chaining methods. Have a look at the examples again I linked or from another project as @Teller suggested. Your other lines of code are fine.

Finally! Done. Thanks for the help everyone.

1 Like