Syntax error; question 7?


#1

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";
}

}

What is wrong with it?


#2

Hi,

This bracket isn't closed.


#3

Ah i just changed it, but there is still an error..? :confused:


#4

I got it now, thanks for your help! Much appreciated