Build a Rock, Paper, Scissors Game - Step 14

Tell us what’s happening:

I have tested the game thoroughly, and everything works as it should but it still fails the test, i can’t find the problem

Your code so far

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

/* file: styles.css */

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

function resetGame() {
  // Resets the player and computer scores to 0
  playerScore = 0;
  computerScore = 0;

  // Updates the playerScoreSpanElement and computerScoreSpanElement to display the new scores
  playerScoreSpanElement.innerText = playerScore;
  computerScoreSpanElement.innerText = computerScore;

  // Hides the resetGameBtn button
  resetGameBtn.style.display = "none";

  // Shows the optionsContainer so the player can play again
  optionsContainer.style.display = "block";

  // Clears the content for the winnerMsgElement and roundResultsMsgElement
  winnerMsgElement.innerText = "";
  roundResultsMsgElement.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/143.0.0.0 Safari/537.36

Challenge Information:

Build a Rock, Paper, Scissors Game - Step 14

You don’t get an error?

When I click “play again” the game still says says “Computer wins! Paper beats Rock” and the console says “ReferenceError: roundResultsMsgElement is not defined”

1 Like

yeah that’s right no errors game resets …. reset button disappears other buttons come into focus again scores reset to 0 was playing it for like 45mins trying to throw an error … ok so i just tried it again and now its saying that

thanks for that pointed me directly at the problem

2 Likes