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

anyone help please

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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

I think you forgot the innerText in these: winnerMsgElement and roundResultsMsg

3 Likes
computerScoreSpanElement.innerText = playerScore;
1 Like

no, look at the code i shared. i added innerText method

No, you didn’t
check again

2 Likes

okay. i see what you mean now. still givung same error
function resetGame() {
playerScore = 0;
computerScore = 0;
computerScoreSpanElement.innerText = computerScore;
playerScoreSpanElement.innerText = playerScore;
resetGameBtn.style.display = “none”;
optionsContainer.style.display = “block”;
winnerMsgElement = “”;
roundResultsMsg = “”;
}

1 Like

Thanks so much guys. I must have stayed too long on the screen :laughing: :laughing:

1 Like

Everyone makes silly mistakes sometimes

1 Like

This is the complete correct code

– removed solution –

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Thank you.

1 Like