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

Tell us what’s happening:

freeCodeCamp added recently a 6-step exercise in the first block of the JavaScript algos and data structures course. The 6th step of the exercise simply asks to reset a bunch of values back to their defaults.

I do it but the test fails. I write

function resetGame() {
playerScore = 0;
}
and the test says “Your resetGame function should set the playerScore to 0”.

I don’t know what to do. Help.

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";
  roundResultsMsg = "";
  winnerMsgElement = "";
};

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0

Challenge Information:

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

The roudResultsMsg and winnerMsgElements are elements, so you will have to use the innerText property to update the text content