SPOLER
**
Rock, Paper, or Scissors
Please help with the below. The code runs but when I log it, it gives me both the answers and an undefined. Why is this?
const getUserChoice = userInput => {
userInput= userInput.toLowerCase();
if (userInput== ‘rock’ ||userInput== ‘paper’ || userInput==‘scissors’) {
console.log(userInput);}
else {
console.log('Please insert the correct word');
};
};
console.log(getUserChoice(‘paper’));
**