HELP! SyntaxError: Unexpected keyword 'else'


#1

Here is my code:

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

and i get : SyntaxError: Unexpected keyword 'else'

plz help


#3

It's your brackets. You need a couple more. Every opening bracket has a closing bracket. If you click directly right next to a bracket a small rectangle with go around it's partner. You can have corresponding brackets lined up vertically to make things easier. The next set should be Tabbed over and so on and so forth.

Here is an example. See how everything is line up?


#4

I am having the exact same problem. I know its a bracket issue, but I can't figure out which brackets? The IF inside an IF is kind of throwing me off.


#5

@zac.moran @squishington