What if choice 1 is paper, help thanks


Hi, i was having trouble with this lesson, it keeps saying
Oops, try again. There was a problem with your syntax.
I've checked it several times also compared to other people's answer around here, wasn't able to find the problem...Thanks for answering my question in advance

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


find the problem ,left out a } ,thanks,


var compare = function(choice1,choice2){ // no matching closing curly bracket

your function doesn't close, the opening bracket doesn't have a matching closing bracket