So I've been running the below JavaScript code
const getUserChoice = userInput => {
userInput = userInput.toLowerCase();
if (userInput === 'rock' || 'paper' || 'scissors') {
return userInput
} else {
console.log('Error: please give relevant input \'rock\' \'paper\' or \'scissors\'.')
}
}
getUserChoice('spock')
console.log(getUserChoice('paper'))
The code does correctly print out paper but it doesn't print the console.log error from the else conditional on the first call of the function with 'spock'