6. What if choice1 is Rock


#1

What's wrong here?
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";
}

}


#2

Hi you should add a } after the else statement for closing the compare function


#3

Isn't it done already :\

Not sure if this was what u meant


#4

Here

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";
} <=== this close the else statement 

} < === this close your else if statement 

} <== you should add one to close your compare function

#5

Oh i see what you meant, thank you man!