Hi, I’m trying to complete this project: https://www.codecademy.com/courses/introduction-to-javascript/projects/rock-paper-scissors-javascript
but for some reason, I keep getting the following error: “});
** ^**
SyntaxError: Unexpected token )”
I’ve tried commenting out parts of the code, and it appears that the part where I define the “determineWinner” function causes this error. but I simply don’t see what might be causing it. Can someone help me, please?
console.log('hi');
const getUserChoice = userInput => {
userInput = userInput.toLowerCase();
if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
return userInput;
} else {
console.log('Error! Please, enter a valid option for this game: rock, paper or scissors');
}
}
function getComputerChoice() {
let choice = Math.floor(Math.random() * 3);
switch (choice) {
case 0:
return 'rock'
break;
case 1:
return 'paper'
break;
case 2:
return 'scissors'
break;
default:
return 'error! something went wrong'
break;
}
}
let userChoice = getUserChoice;
let computerChoice = getComputerChoice;
function determineWinner(userChoice, computerChoice) {
if (userChoice === computerChoice) {
return 'This game was a tie! One more try, then?'
}