Problem with 6


#1

I have problem with this code
var compare = function(choice1, choice2)
{
if(choice1 === "rock") {
return "The result is a tie!";
}
else if (choice2 === "scissors"){
return "rock wins" ;
}
else {
return "paper wins";
}
}

Probably solution is really simple but i don't see it.
Thank you in advanced !


#2

Well at first this doesn't make much sense:

if(choice1 === "rock") {
    return "The result is a tie!";
 }

why should it be a tie if you choose "rock"? So this should rather be a choice1 === choice2 and for the rest have a look at the hint of 6/9


#3

Yeah, you are totally right.
I should notice it !
Thanks !