What if choice 1 is rock HELP


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


unexpected end of input

Replace this line with your code.


You need another ending curly brace.


It totally worked. But, why I am new I do not understand the curly brace?? Can you explain?


You needed it to close your function.

function hello() {


as @cadecodes said, you need another curly brace. Without another curly brace, it'll come up as a syntax error. Make sure before you submit that all your opening curly braces all have closing curly braces. Each one must have a beginning and an end.