Tell us what’s happening:
Step 6
If the player or computer has won the game, there should be an option to reset the game and play again.
Complete the resetGame function that accomplishes the following:
Resets the player and computer scores to 0.
Updates the playerScoreSpanElement and computerScoreSpanElement to display the new scores.
Hides the resetGameBtn button.
Shows the optionsContainer so the player can play again.
Clears the content for the winnerMsgElement and roundResultsMsg elements.
Tips
You can use the inn
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function resetGame() {
playerScore = "0";
computerScore = "0";
playerScoreSpanElement.innertext = "0";
computerScoreSpanElement.innertext = "0";
resetGameBtn.style.display = "none";
optionConatiner.style.diplay = "none";
roundResultMsg.innerText = "";
winnerMsgElement.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/126.0.0.0 Safari/537.36
Challenge Information:
Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 6