Tell us what’s happening:
not sure whats wrong i keep getting the hint that your get round results should return a string not sure what that means but i double checked the code and the logic seems right
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
function getRoundResults(userOption) {
const computerResult = getRandomComputerResult();
if (hasPlayerwonTheRound(userOption, computerResult)) {playerScore++;
return `Player wins! ${userOPtion} beats ${computerResult}`;}
else if (computerResults === userOption) {
return `Its a tie! Both chose ${userOption}`;}
else {
computerScore++;
return `Computer wins! ${computerResults} 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Challenge Information:
Review DOM Manipulation by Building a Rock, Paper, Scissors Game - Step 3