Can some one tell me whatim doing wrong

var compare = function (choice1,choice2){
    if(choice1 = choice2){
        return "The result is a tie!";
else if(choice1 === "rock"){
    if(choice2 === "scissors"){
        return "rock wins"
        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


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.


thanks tagplayer5484