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

Tell us what’s happening:

I think there’s a bug on the page, it keeps saying the first line is incorrect but it isn’t
I constantly get the error " your resetGame function should set the playerScore to 0" but when I keep only the first line of code setting the playerScore to 0, it says that the resetGame function should set the computerScore to 0, as saying that the playerScore line is correct, but then when I write 5 out of the 8 lines of code I get the error on the first line

resetGame

function should set the

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 = ""
  roundResultMsgElement.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/138.0.0.0 Safari/537.36

Challenge Information:

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

I have opened the browser console to see more details on the failures, and I see dom-test-evaluator.js:2 ReferenceError: roundResultMsgElement is not defined

found it! thank you very much. In my defense, the hint directed my attention to the first line :sweat_smile:

when you get errors like that the tests do not pass by default, sometimes it is a bit misleading but it is how JavaScript works