title: Javascript - Rock, Paper, Scissors (odinProject) Helpppp
body: <p>I am having trouble with this assignment to create a game of rock, paper, scissors in javascript (Assignment from the odinproject.com). Whenever I use rock as my input it seems to work just fine. However, it does not work properly for when paper or scissors are entered. Please any help, suggestions, and advice would be greatly appreciate it. I am still very new at this and eager to learn more!</p>
  <p>Thanks!</p>
  <p>Here's my code:</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>function userChoice() {
    const userChoice = prompt("Do you choose Rock, Paper, or Scissors?").toLowerCase();
    return userChoice
  }
  
  function compChoice() {
    let compChoice = Math.random();
    if (compChoice &lt; 0.34) {
      compChoice = "rock";
    } else if (compChoice &lt;= 0.67) {
      compChoice = "paper";
    } else {
      compChoice = "scissors";
    }
    return compChoice
  }
  
  function playRound(userChoice, compChoice) {
    //Rock Choice
    if (userChoice == "rock" &amp;&amp; compChoice == "scissors") {
      return "You Win! rock beats scissors!";
    } else if (userChoice == "rock" &amp;&amp; compChoice == "paper") {
      return "Loser! paper Beats rock";
    } else if (userChoice == "rock" &amp;&amp; compChoice == "rock") {
      return "It's a Draw";
    } else {
      return "Something Went Wrong";
    }
    //paper Choice
    if (userChoice == "paper" &amp;&amp; compChoice == "rock") {
      return "You Win! paper beats rock";
    } else if (userChoice == "paper" &amp;&amp; compChoice == "scissors") {
      return "You Lose! scissors beats paper";
    } else if (userChoice == "paper" &amp;&amp; compChoice == "paper") {
      return "It's a Draw";
    } else {
      return "Something Went wrong";
    }
    //scissors Choice
    if (userChoice == "scissors" &amp;&amp; compChoice == "paper") {
      return "You win! scissors beat paper";
    } else if (userChoice == "scissors" &amp;&amp; compChoice == "rock") {
      return "You Lose! rock beats scissors";
    } else if (userChoice == "scissors" &amp;&amp; compChoice == "scissors") {
      return "It's a Draw";
    } else {
      return "Something Went Wrong";
    }
  }
  
  console.log(playRound(userChoice(), compChoice()))</code></pre>
  </div>
  </div>
  </p>