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

Tell us what’s happening:

I don’t seem to find the bug in my code.. whenever I run it , it keeps saying I should return a string. Please I need help and some explanation thanks ..

Your code so far

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

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

function getRoundResults(userOption) {
  const computerResult = getRandomComputerResult();
  if (hasPlayerWonTheRound(userOption, computerResult)) {
    playerWins += 1;
    return `Player wins! ${userOption} beats ${computerResult}`;
  }
  else if (userOption === computerResult) {
    return `It's a tie! Both chose ${userOption}`;
  }
  else {
    computerWins += 1;
    return `Computer wins! ${computerResult} beats ${userOption}`;
  }
}
console.log(getRoundResults("Rock"));
console.log("Player Score: ", playerScore, "Computer Score: ", computerScore);

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

Your browser information:

User Agent is: Mozilla/5.0 (Linux; U; Android 12; en-ng; CPH2387 Build/SP1A.210812.016) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36 PHX/16.8

Challenge Information:

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

What errors do you see in the console?

If the player wins the round, update the playerScore by 1 and return the message “Player wins! [player’s choice] beats [computer’s choice]”.

If the computer wins the round, update the computerScore by 1 and return the message "Computer wins! [computer's choice] beats [player's choice]".

Can you double check that these instructions are completed properly?

Thanks I have solved it