What if choice1 is rock? (Help plz)



It keeps giving me: Oops, try again. There was a problem with your syntax.
Please Help.

function compare(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!";"


this line:

return "Paper wins!";"

3 quotation marks (")? Not sure that will work


I've removed it, but its still having syntax errors.


your function opening curly bracket ({) doesn't have a matching closing tag (})


Ah, It works!
Thank you! :sweat_smile: