Help me : What if choice1 is paper?


Help me solve this error code... which part is wrong?


your function openings curly bracket ({) doesn't have a matching closing bracket


I have add close bracket (}) in line 13, but problem is same...


can you copy paste your code to the forum so i can actually run it? It is super difficult to debug from a image


Here my code, please help me :frowning:

var compare = function(choice1, choice2) {
    if (choice1 === choice2) {
       return "The result is a tie!";}

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


this line:

if (choice2 === "rock");{

the semi-colon is wrong, it means the if statement never gets executed properly


I have deleted it (semi-colon), but the result still same :

" SyntaxError: Unexpected end of input "


given the fact that i already indicated what the problem was, why you got this error message, i thought you would be capable of resolving it


ok, i try another way... thank you for instruction...