Please some help! Build "Rock, Paper, Scissors" Syntax error: Unexpected end of input


<Below this line, in what way does your code behave incorrectly? Include ALL error mes

SyntaxError: Unexpected end of input

Replace this line with your code.

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



your function:

var compare = function(choice1,choice2) {

the ( of your function doesn't have a matching }


Sorry but I still don't get it, where exactly should I put the "}" or the "(" ?


at the end? the conditions are nested inside the function


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