6. What if choice 1 is rock? please help, thank you :)


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/javascript-beginner-en-Bthev-mskY8/1/2?curriculum_id=506324b3a7dffd00020bf661#

it says SyntaxError: Unexpected token else ;( please help me find the errors, thanks a billion!

<In what way does your code behave incorrectly? Include ALL error messages.>

```

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

}

<do not remove the three backticks above>

#2

Hi this part you close } the compare function before so you should remove one }

if(choice1===choice2)
    {
     return"The result is a tie!";   
    }
  
}; <== remove this one 

Then here you should add one } for closing the compare function

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

} <== add one here

#3

it works now :))))thank you so so much!