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

Tell us what’s happening:

Not sure what is currently going wrong with this code, all the .innerTexts are set but the tutor prompt keeps saying resetGame should set playerScore to 0

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

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

Challenge Information:

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

Hi!

Don’t use addition assignment operator.

Thanks. I removed that, but it still says " Your resetGame function should set the playerScore to 0"

Also you have missing the innerText property in above line.

And it works! Thanks!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.