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

Tell us what’s happening:

Can somebody please tell me where my mistake is, just tell me where it is i am searching for 3 hours like crazy. i wanna move on :slight_smile:

Your code so far

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

/* 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 || computerScore === 3) 
  { winnerMsgElement.innerText = `${ playerScore ===3 ? "Player" : "Computer" } 
  has won the game!`;
  optionsContainer.style.display = "none";
  resetGameBtn.style.display = "block";

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

Your browser information:

User Agent ist: 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 5

Your code is perfect.

But in your template literal you shouldn’t make it on two lines, it should be on one line as the template literal will render it exactly as you write it.

And make sure that you close your if and the showResults function with }.

Did you want to put a curly brace there?{ winnerMsgElement.innerText = ${ playerScore ===3 ? “Player” : “Computer” }
has won the game!;
Update: I just added two curly braces and it passed.

this a perfect code :clap: :clap: