I keep encountering an Unexpected token error in my code, specifically with a closing parenthesis ). What exactly does this error signify?
Experimented by adding and removing parentheses as well as curly brackets.
const getUserChoice = userInput => {userInput = userInput.toLowerCase();
if(userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
return userInput;
} else {
console.log('Error! That\'s not part of the game!');
}
Instead of not logging anything, it unexpectedly logs an error message.