Having trouble with Rock, Paper, Scissors


Having trouble with some syntax on rock paper scissors, any help would be greatly appreciate. Thanks!

I just keep getting this error message...

Oops, try again. There was a problem with your syntax.

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


It would see you have 5 { but only 4 } try adding a } to balance it out!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.