Your getRoundResults function should return the correct message based on who wins the round. If no one wins, the message should say it’s a tie.
I don’t see anything wrong with the Message
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
if (hasPlayerWonTheRound(userOption, computerChoice)) {
// Player wins
playerScore += 1; // update the score
return `Player wins! ${userOption} beats ${computerChoice}`;
} else if (userOption === computerChoice) {
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Your getRoundResults function should return the correct message based on who wins the round. If no one wins, the message should say it’s a tie.
what did I do wrong here?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
if (hasPlayerWonTheRound(userOption, computerChoice)) {
// Player wins
playerScore += 1; // update the score
return `Player wins! ${userOption} beats ${computerChoice}`;
} else if (userOption === computerChoice) {
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36