Syntax error please help


#1

Continuing the discussion from Javascript Build "Rock, Paper, Scissors" Lesson 9:


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


#2

missing quotation mark " to mark the end of your string


#3

I put the quotation marks and run but still same synntax errors.


#4

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


#5

your function logs to the console, it doesn't return


#6

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