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

Tell us what’s happening:

Hello, I’ve researched the hell out of this and compared my code to many others on here, but for some reason not a single test in the console has passed. I get a repeated error of [TypeError: Cannot set properties of undefined (setting ‘display’)], I assume it corresponds to each test, 8 in total. Any help would be greatly appreciated.

Your code so far

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

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

function resetGame() {
  playerScore = 0;
  computerScore = 0;
  playerScoreSpanElement.innerText = playerScore;
  computerScoreSpanElement.innerText = computerScore;
  resetGameBtn.styles.display = "none";
  optionsContainer.styles.display = "block";
  winnerMsgElement.innerText = "";
  roundResultsMsg.innerText = "";
};

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

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

Hi there and welcome to our community!

You’re probably getting the undefined error because the property should be style, not styles (wherever you’re using this in your code).

1 Like

You are the man! Thank you!

1 Like