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

I keep getting this error even though my code seems correct, could someone please help with this. Maybe I am missing something.
Your resetGame function should set the playerScore to 0.

Your code so far

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

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

function resetGame() {
playerScore = 0;
computerScore = 0;
playerScoreSpanElement = playerScore;
computerScoreSpanElement = computerScore;
resetGameBtn = "none";
optionsContainer = "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/131.0.0.0 Safari/537.36

Challenge Information:

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

Hi there!

You have missing the display style properties. Re-read the challenge instructions carefully.

Thank you so much for your response I am just having trouble pushing it through the code doesn’t seem to pass.

function resetGame() {

playerScore = 0;

computerScore = 0;

playerScoreSpanElement = playerScore;

computerScoreSpanElement = computerScore;

resetGameBtn.style.display = “none”;

optionsContainer.style.display = “block”;

winnerMsgElement.innerText = “”;

roundResultsMsg.innerText = “”;

};

Sorry, your code does not pass. Try again.

Your resetGame function should set the playerScore to 0.

I realized that, you also aren’t used the innerText property on span elements variable.

Thanks man!!! Silly me.

1 Like