Choice1 does really not want to be paper - SyntaxError: Unexpected token else


#1

Followed the same else if statement as if choice1 was rock, and keep getting a SyntaxError: Unexpected token else. Can anyone identify the issue here?


#2

@ainsleighb,
You are forgetting a closing-curly-bracket-}
with which you would close the ELSE-IF code-block

Please read
http://www.codecademy.com/forum_questions/559dcb4be39efe550f00006b
and concentrate on:

  • the creation of the compare function
  • the truth-table
  • the build of the IF ELSE-IF statement structure as part of the compare FUNCTION-BODY
  • the execution of the compare function (keeping in mind that the return statement is used )

#3

Read your post on building IF ELSE-IF statements as part of compare FUNCTION-BODY, and it seems I've taken the step of closing the } of the ELSE-IF code block ... unless I am missing something?


#4

@ainsleighb,
You are NOT closing the ELSE-IF of choice1 === "rock"