Rock Paper Scissors project

https://www.codecademy.com/courses/introduction-to-javascript/projects/rock-paper-scissors-javascript
Not sure if this is a bug or not.

const getUserChoice = userInput => {
  userInput = userInput.toLowerCase();
  if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
    return userInput
  } else return console.log('Error')
};

const getComputerChoice = () => {
  const randomNumber = Math.floor(Math.random() * 3);
  switch (randomNumber) {
    case 0: 
      return 'rock';
    case 1: 
      return 'paper';
    case 2 :
      return 'sciccors';
    }
  };

const determineWinner = (userChoice, computerChoice) => {
if (userChoice === computerChoice) {
  return 'It\'s a tie!'
} if  (userChoice === 'rock') {
    if (computerChoice === 'paper') {
      return 'I lost.'
    } else {
      return "I won!"
    }
        if (userChoice === 'paper') {
          if (computerChoice === 'scissors')
            return 'I lost.'
        } else {
            return 'I won!'
        }   if (userChoice === 'scissors') {
          if (computerChoice === 'paper') {
            return 'I won!'
          } else {
            return 'I lost.'
          }
        }
  }
};
console.log(determineWinner('rock','paper'))

continued further and I ended up getting this as my output. Any idea what I did wrong?
Here’s my code:

const getUserChoice = (userInput) => {
  userInput = userInput.toLowerCase();
  if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
    return userInput
  } else return console.log('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 = (userChoice, computerChoice) => {
if (userChoice === computerChoice) {
  return 'It\'s a tie!'
} if  (userChoice === 'rock') {
    if (computerChoice === 'paper') {
      return 'I lost.'
    } else {
      return "I won!"
    }
        if (userChoice === 'paper') {
          if (computerChoice === 'scissors')
            return 'I lost.'
        } else {
            return 'I won!'
        }   if (userChoice === 'scissors') {
          if (computerChoice === 'paper') {
            return 'I won!'
          } else {
            return 'I lost.'
          }
        }
  }
};

const playGame = () => {
 const userChoice = getUserChoice('scissors');
 const computerChoice = getComputerChoice();
 console.log('You threw ' + getUserChoice);
 console.log('The computer threw ' + getComputerChoice);
 console.log(determineWinner(userChoice, computerChoice));
}
playGame()

here’s the output:

You threw (userInput) => {
  userInput = userInput.toLowerCase();
  if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
    return userInput
  } else return console.log('Error')
}
The computer threw () => {
  const randomNumber = Math.floor(Math.random() * 3);
  switch (randomNumber) {
    case 0: 
      return 'rock';
    case 1: 
      return 'paper';
    case 2 :
      return 'scissors';
    }
  }
undefined

Hello, and welcome to the forums!

Double check your console.log() calls here. getUserChoice and getComputerChoice are your functions, not the variables you stored the choices in.

As for why your call to determineWinner() returns undefined, you will need to review your if statements in that function. The way they are structured right now, not all possible user choices are being evaluated.

Click if you need another hint

Right now your function is only able to handle the userChoice being rock. The other if statements you have for paper and scissors are both nested inside the block of code that runs if the userChoice is rock.

else if can come in handy here