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

Tell us what’s happening:

Your resetGame function should set the playerScore to 0.

This is driving me crazy. I have set it to 0.

function resetGame() {
playerScore = 0;
computerScore = 0;

Your code so far

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

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

function resetGame() {
  playerScore = 0;
  computerScore = 0;
  playerScoreSpanElement.innerText = playerScore;
  computerScoreSpanElement.innerText = computerScore;
  resetGameBtn.style.display = "hide";
  optionsContainer.style.display = "block";
  winnerMsgElement = "";
  roundResultsMsg = "";

};

// 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/132.0.0.0 Safari/537.36 Edg/132.0.0.0

Challenge Information:

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

Hello~ The errors are occasionally misleading. When that happens, I add the lines in sequentially. It’s usually an error in syntax, spelling or unassigned properties.

winnerMsgElement and roundResultsMsg require a specific target. (text property )

The display property value for “hide” is “none”.

Thanks, I ended up starting from scratch and rewriting everything. I’m not sure where the spelling was off, but it has resolved.

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