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?
You are forgetting a closing-curly-bracket-}
with which you would close the ELSE-IF code-block
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 )
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?