7. What if choice 1 is paper


#1

I could some help on this one. I keep getting: Oops, try again. Your code returned 'paper wins' instead of 'scissors wins' when the inputs are paper and scissors.

I have review the code but not sure what is wrong. Can someone please review my code and help me out.
Thanks for your time


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 if (choice1 === "paper"){
                
                if (choice2 === "rock"){
                    
                    return "paper wins";
                }
            }
            else {
                return "scissors wins";
            }
            
    
    }
        
    else {
        return "paper wins";
    }

7. What if choice 1 is paper?
#2

Have a look at your syntax, now have a look at what it should look like:

if (condition) {
  // do something
}
else if (condition) {
  if (condition) {
    // do something 
  } 
  else {
    // do something else
  }
}