Rock, Paper, scissors

This is my code for Rock,paper, scissors and I keep getting undefined when I console.log(determine winner)
I watched the walkthrough video but I don’t see my error.

const getUserChoice = userInput => {
userInput = userInput.toLowerCase();
if(userInput === ‘rock’ || userInput === ‘paper’ || userInput ===‘scissors’) {
return userInput;
} else {
console.log(‘Error’);
}
}

const getComputerChoice = () => {
const randomNumber = Math.floor(Math.random() * 3);
switch (randomNumber) {
case 0:
return ‘rock’;
case 1:
return ‘paper’;
case 2:
return ‘scissors’;
}
};

const determineWinner = (getUserChoice,getComputerChoice) => {
if(getUserChoice === getComputerChoice)
return ‘Draw’
}
if (getUserChoice === ‘rock’) {
if(getComputerChoice === ‘paper’) {
return ‘lose’
} else {
return ‘win’;
}
}

if (getUserChoice === ‘paper’) {
if(getComputerChoice === ‘scissors’) {
return ‘lose’
} else {
return ‘win’;
}
}

if (getUserChoice === ‘scissors’) {
if(getComputerChoice === ‘rock’) {
return ‘lose’
} else {
return ‘win’;
}
}

console.log(determineWinner(‘rock’, ‘scissors’));
console.log(determineWinner(‘paper’, ‘rock’));
console.log(determineWinner(‘scissors’, ‘paper’));

It looks like you may be missing an opening curly bracket ( { ) right after the first if statement in the determineWinner() function (I think on line 25). You’ll then have to put a closing curly bracket at the end of the function on line 51.

Seems to work fine otherwise, good job!

Thank you. After starting over and comparing side by side was able to find that mistake.