JSFiddle - React, Tailwind, and code Playground
by Filipe Augusto Lima de Souza
JavaScript
function choice(userChoice) {
switch(userChoice)
{
case 'rock': break;
case 'scissors': break;
case 'paper': break;
default: {
console.log(userChoice + " That is not one of the options");
return false;
}
}
}
choice('rock');
choice('scissors');
choice('paper');
choice('wrong');