6. What if choice1 is rock?


#1


6. What if choice1 is rock?


SyntaxError: Syntax error


Replace this line with your code. 
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{
        "Paper wins"
};


#2

you are missing a two closing curly brackets (}):

var compare = function (choice1, choice2){
    if (choice1 === choice2){
        return "The result is a tie!";
    }else if (choice1 === "rock"){
        if (choice2 === scissors){
            return "rock wins"; // missing } to close if
        else{
        "Paper wins" // missing } to close else
};

see comments in code above


#3

thank you so much <3


#4