Oops Try Again....and again.. and again


var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("Computer: " + computerChoice);

var compare = function(choice1,choice2) {
if(choice1 === choice2)
{return "The result is a tie!";}

else if (choice1 === "rock") {
       if (choice2 === "scissors") 
          return"rock wins";}

else {return "paper wins";}

else if (choice1 === "paper") {
        if(choice2 === "rock") 
           return"paper wins";}

else {return"scissors wins";}


Not sure why this code won't clear to the next lesson...any suggestions? It keeps saying try again.


You have multiple instances of semicolons inside of your curly braces. I will pull up my lesson and check, but put your semicolons outside of your curly braces.
else {return"scissors wins";} <------- move this to the outside
you have multiple instances of this in your code.


you didn't open the { after the if statements