Rock,Paper,Scissors Project

https://www.codecademy.com/paths/web-development/tracks/getting-started-with-javascript/modules/learn-javascript-functions/projects/rock-paper-scissors-javascript

Hello I am new to coding, and having difficulty with the Rock,Paper,Scrissors Project under Java script functions.

I am getting the error message: /home/ccuser/workspace/javascript_101_Unit_3/Unit_3/rockPaperScissors.js:26
if(userChoice === ‘rock’){
^

ReferenceError: userChoice is not defined

To my understanding the issue is line 26 or that the parameter userChoice is not defined. I am not sure how to define it in the body of the function determineWinner. I am not sure how to assign it a value.

An example of how to define it would be helpful.

Below is my code:

const getUserChoice = (userInput) => {
userInput = userInput.toLowerCase(); 
if(userInput === 'rock' || userInput === 'paper' || userInput === 'scissors'){
  return userInput
} else {
  return console.log('There is an error');
}
}
const getComputerChoice =  () => {
const randomNumber = Math.floor(Math.random() * 3);
  switch(randomNumber) {
    case 0:
     return 'rock';
    case 1:
     return 'paper';
    case 2:
     return 'scissors';
  } 
}
const determineWinner = function (userChoice,computerChoice)  {
  if(userChoice === computerChoice){
    return 'The game is a tie!';
  }
}

if(userChoice === 'rock'){
  return 'The computer won';
if(computerChoice === 'paper'){
} else{
  return 'You won';
}
}

Thank you for your time,
Devin

Hello, @raziel14.

Welcome to the forum!

The line referred to in the error message should be included inside your determineWinner() function.

P.S. When posting code please follow these guidelines: How do I format code in my posts?
It appears that one of our moderators formatted your code for you this time.