6. What if choice1 was rock


#1


Please help I keep getting the same error

SyntaxError: Unexpected token else


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


#2

function compare(choice1, choice2){
    if (choice1 === choice2){
        return "The result is a tie!";
    }
} /* closes your function */

your else if should still be inside the function


#3

Yes it should, thank you very much, not sure why i did not see that