Tell us what’s happening:
I found problem with this error “2. 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 try to recheck and adjust a code but it still not work need assist please.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function getRoundResults(userOption, computerResult) {
if (hasPlayerWonTheRound(userOption, computerResult)) {
playerScore++;
return `Player wins! ${userOption} beats ${computerResult}`;
}
else if (userOption === computerResult) {
return `It's a tie! Both chose ${userOption}`;
}
else {
computerScore++;
return `Computer wins! ${computerResult} beats ${userOption}`;
}
}
// 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/135.0.0.0 Safari/537.36
Challenge Information:
Build a Rock, Paper, Scissors Game - Step 6