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

Tell us what’s happening:

Please what am i supposed to do?? done everything i think is right to me

Your code so far

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

/* file: styles.css */

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

const playerScoreSpanElement = document.getElementById("player-score");
const computerScoreSpanElement = document.getElementById("computer-score");
const roundResultsMsg = document.getElementById("results-msg");
const winnerMsgElement = document.getElementById("winner-msg");
const optionsContainer = document.querySelector(".options-container");
const resetGameBtn = document.getElementById("reset-game-btn");

function showResults(userOption) {
  roundResultsMsg.innerText = getRoundResults(userOption);
  computerScoreSpanElement.innerText = computerScore;
  playerScoreSpanElement.innerText = playerScore;
      if (playerScore === 3){
         winnerMsgElement.innerText = "Player has won the game!";
         resetGameBtn.style.display = "show";
         optionsContainer.style.display = "block";
      } else if (computerScore === 3) {
         winnerMsgElement.innerText = "Computer has won the game!";
          resetGameBtn.style.display = "show";
         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/124.0.0.0 Safari/537.36

Challenge Information:

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

The problem is with your CSS property calls, to display you should use “block” and to hide you have to use “none”.

  • wrong values for “resetGameBtn”, make use of correct “value” for them to show on screen
  • wrong values for “optionsContainer”, make use of correct “value” to hide them from screen

do those for both “conditionals” code blocks, happy coding :slight_smile: