7/9 Build rock paper scissors


Can't find where my error is, have spent the last 20 minutes going through the other posts and I believe my code is exactly as others have said it should look like but im still getting the unexpected token error {
this is what i have:
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";

else if (choice1 === "paper") {
if (choice2 === "rock") {
return "paper wins";
else (choice2 === "scissors") {
return "scissor wins";

EDIT: I removed the " (choice2 === "scissors") from the 5 line from the bottom and now my error message is " OOPS! Your code returned 'scissor wins' instead of 'scissors wins' when the inputs are paper and scissors"

like what?! is codecademy trolling me lol

I also tried refreshing didnt work :cry:

moved on to 8 and with my edited code i finhed off the tasks in part 8 and the code all worked. Seems like im having a bug with it recognizing my code in part 7 properly.


Hey first, I don't see any problems at first sight. :smiley:

I suggest refreshing first, but I'll look more into your code right now. :smile: