Ajax-loader-large-white
Build "Rock, Paper, Scissors"
What if choice1 is paper?

Now what if choice1 is "paper"? Given choice1 is "paper",

a. if choice2 === "rock", then "paper" wins.
b. if choice2 === "scissors", then "scissors" wins.

Instructions
  1. Inside the compare() function under the existing code, write another else if statement where the condition is choice1 === "paper".
  2. Inside this else if statement, write an if / else statement. If choice2 === "rock", return "paper wins". Else, return "scissors wins".
?
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

This nesting of if / else blocks can be tricky, especially at first. Your code should have this basic outline:

if (condition) {
  // do something
}
else if (condition) {
  if (condition) {
    // do something 
  } 
  else {
    // do something else
  }
} 
script.js