Rock, Paper, Scissors

I am so lost! My console.log is printing everything in my function and I can’t figure out why. Please give me a clue to figure out my mistake.
I appreciate your help!
treedreamin

This is the code:

const getUserChoice = (userInput) => {

userInput = userInput.toLowerCase();

if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {

  return userInput;

} else {

  console.log('Invalid input')

}

};

function getComputerChoice() {

let randomNumber = Math.floor(Math.random() * 3);

switch (randomNumber) {

  case 0:

    return 'Rock';

    break;

  case 1:

    return 'Paper';

    break;

  case 2:

    'Scissors';

    break;

}

};

function determineWinner(getUserChoice, getComputerChoice) {

 if (getUserChoice === getComputerChoice) {

   return 'The game is a tie!' ;

 }

 if (getUserChoice === 'rock'){

   if (getComputerChoice === 'paper')

   return 'The computer won!';

 } else { 

   return 'You won!' ;

 }

 if (getUserChoice === 'paper'){

   if (getComputerChoice === 'scissors')

   return 'The Computer won! ';

   else {

     return 'You won!';

   }

 }

};

if (getUserChoice === 'scissors') {

  if (getComputerChoice === 'paper')

  return 'You won!';

  else {

    return 'Computer won!';

  }

}

if (getUserChoice === 'rock') {

  if (getCmputerChoice === 'scissors')

  return 'You won!';

  else {

    return 'Computer won!';

  }

}

const playGame = () => {

  const userChoice = getUserChoice('rock');

  const computerChoice = getComputerChoice();

  console.log('You threw: ' + getUserChoice);

  console.log('The computer Threw: ' + getComputerChoice);

  console.log(determineWinner(getUserChoice, getComputerChoice));

}

 

 playGame()

And this is what is printing on the console:

You threw: (userInput) => {
userInput = userInput.toLowerCase();
if (userInput === ‘rock’ || userInput === ‘paper’ || userInput === ‘scissors’) {
return userInput;
} else {
console.log(‘Invalid input’)
}
}
The computer Threw: function getComputerChoice() {
let randomNumber = Math.floor(Math.random() * 3);
switch (randomNumber) {
case 0:
return ‘Rock’;
break;
case 1:
return ‘Paper’;
break;
case 2:
‘Scissors’;
break;
}
}
You won!

Hello! This is because you don’t print the function call, you print the function:

Notice how you use the name of the function getComputerChoice and getUserChoice, yet you do not call the function. When you call a function, you put parentheses at the end:

function someFunc(){
  return "Hello";
}
//calling the function:
someFunc();
//printing the function call:
console.log(someFunc()); //prints "Hello"
//printing the function:
console.log(someFunc); //prints [Function: someFunc]
console.log("Some Func:" + someFunc);
/*prints:
Some Funcfunction someFunc(){
  return "Hello";
}
*/

I hope this helps!