Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created January 27, 2019 06:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codecademydev/04a686e20462e63dc39ce65dc2d4a0b8 to your computer and use it in GitHub Desktop.
Codecademy export
const getUserChoice = (userInput) => {
userInput = userInput.toLowerCase();
if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
return userInput;
} else {
console.log('Error!');
}
}
console.log(userInput('paper'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment