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

Tell us what’s happening:

I keep getting the hint that I need to set my playerScore to 0, which I believe I am doing. What am I missing??

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("hide");
  optionContainer.style.display("block");
  winnerMsgElement.innerText= "";
  roundResultsMsg.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/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Challenge Information:

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

you have a syntax error so the tests don’t work

function resetGame() {
playerScore = 0;
computerScore = 0;
playerScoreSpanElement.innerText= “0”;
computerScoreSpanElement.innerText = “0”;
resetGameBtn.style.display =“none”;
optionContainer.style.display = “block”;
winnerMsgElement.innerText= “”;
roundResultsMsg.innerText = “”;
};

I changed it to this, and I am still getting the alert. Is that the correct syntax?

Hi there!

You have modified your previous code for that to assignments. You need to update it to playerScore and computerScore, instead you have using a string "0" .

playerScoreSpanElement.innerText= playerScore;
computerScoreSpanElement.innerText = computerScore;

Like this? With this correction it still doesn’t approve.

Actually now I tried your code within the challenge editor, I found a missing word s in the above code line I quoted.
Note: the variable name is missing s in above line. Check line 36 for a reference within the challenge editor.

Ah yay thank you!!! That is so silly of me- I appreciate it so much!!

1 Like