title: im a new learner and cant figure out why my code is not working
body: <p>I have just recently got into coding and have chosen to learn JavaScript as my first language. I have written up code for a Rock, Paper, Scissors game but the wrong outputs come out when I run it? for example I would put my answer as scissors and the computer would choose rock and the game will come out as a tie.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const getUserChoice = userInput =&gt; {
    if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
      return userInput
    } else {
      return 'Error!'
    }
  }
  
  var getComputerChoice = () =&gt; {
    const randomNumber = Math.floor(Math.random() * 3);
    switch (randomNumber) {
      case 0:
        return 'rock'
        break;
      case 1:
        return 'paper'
        break;
      case 2:
        return 'scissors'
        break;
    }
  };
  
  const determineWinner = (userChoice, computerChoice) =&gt; {
    if (userChoice === computerChoice) {
      return 'its a tie!';
    };
    if (userChoice === 'rock') {
      if (computerChoice === 'paper') {
        return 'computer won';
      } else {
        return 'user won';
      }
    }
    if (userChoice === 'paper') {
      if (computerChoice === 'scissors') {
        return 'computer won';
      } else {
        return 'user won'
      }
    }
    if (userChoice === 'scissors') {
      if (computerChoice === 'rock') {
        return 'computer won';
      } else {
        return 'user won'
      }
    }
  };
  
  
  const playGame = () =&gt; {
    console.log(`player chose ${getUserChoice('scissors')}`);
    console.log(`computer chose ${getComputerChoice()}`);
    console.log(determineWinner(getUserChoice("scissors"), getComputerChoice()));
  }
  playGame();</code></pre>
  </div>
  </div>
  </p>