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

Tell us what’s happening:

i am stuck on this challenge ,it says my function should return a string

Your code so far

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

/* file: styles.css */

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

function getRoundResults(userOption) {
  const computerResult = getRandomComputerResult();
  if (userOption === computerResult) {
    return `"It's a tie! Both chose " ${userOption}`;
  } else if (hasPlayerWonTheRound === false) {
    computerScore++;
    return `"Computer wins! " ${computerResult} " beats "  ${userOption}`
  } else (hasPlayerWonTheRound === true){
    playerScore++;
    return `"Player wins! " ${userOption} "beats "${computerResult}`;
  }

}

console.log(getRoundResults("Rock"));
console.log("Player Score: ", playerScore, "Computer Score: ", computerScore);

// 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/130.0.0.0 Safari/537.36

Challenge Information:

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

Hi @ace4real1999

There are several issues with your code.

One of them is, you don’t need quote marks when using template literals or back ticks.

Happy coding