7/9 What if choice 1 is paper


#1

I keep getting Syntaxerror:unexpected token and i don't know why....can someone help? (sorry just started coding)

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


#2

I don't think this bit is correct. You just need to bring out choice 2 === "scissors" and nest it in the else if. So it'd look like this.

else if (choice1 === "rock") {
       if(choice2 ==="scissors") {

Also, you don't need to apologize for needing help haha Everyone needs it every once in a while :slight_smile:


#3

Wow it took me forever to get this lol Thanks alot! :grin: