Can some one tell me whatim doing wrong


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

Oops, try again.
Your code returned 'The result is a tie!' instead of 'paper wins' when the inputs are rock and paper


#2

You have if(choice1 = choice2)

choice1=choice2 sets choice1 equal to choice2. The comparative is ===

Probably a typo, as you have it right further on.


#3

thanks tagplayer5484