Help with Rock, Paper, Scissors project

Hi I am stuck on the Rock, Paper, Scissors Project for JavaScript :https://www.codecademy.com/paths/web-development/tracks/getting-started-with-javascript/modules/learn-javascript-functions/projects/rock-paper-scissors-javascript

Here is my code:

const getUserChoice = userInput => {

userInput = userInput.lowerCase();

if(userInput===‘rock’ || userInput===‘paper’ || userInput===‘scissors’) {

return userInput;

} else {

console.log('Error! Please select either "rock", "paper", or "scissors".')

}

};

For the life of me I can’t figure out why i need to include () in the arrow function I used above. Without it, my code breaks but in the walkthough video the dev uses none and it works fine. Am I missing something here? Sorry if this question seems trivial.

If we can resign ourselves to using a symbol for the stipulated user input,

u = userInput.toLowerCase()

then we can move through the remaining logic without all the typing. We know where we are and what we have in play. A symbol should suffice.

Be that as it may, a quick look back at your code after reading this example should uncover an error. From there one ought to be able to move forward.

Thanks for the reply mtf! I have included your suggestion and it works. I will take on your advice as I learn to code!