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

Tell us what’s happening:

Why i am getting this Your 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;

  roundResultsMsg.innerText = "";
  winnerMsgElement.innerText = "";

  computerScoreSpanElement.innerText = computerScore;
  playerScoreSpanElement.innerText = playerScore;

   // Hide the reset button
  const resetGameBtn = document.getElementById('reset-game-btn');
  resetGameBtn.style.display = 'none';

  // Show the options container
  const optionsContainer = document.getElementById('options-container');
  optionsContainer.style.display = 'block';

};

// 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/127.0.0.0 Safari/537.36

Challenge Information:

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

Hi there!

You didn’t need to declare the variable and assign id to it within the function. Because it’s already declared and assigned on top of the challenge editor in line number 36 and 37. Remove the declaration and assignment of id.