What am i doing wrong


#1



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";
}
}
}



Replace this line with your code.


#2

Your syntax, You have a semi colon after the condition you need to remove it, also missing brackets by else if

You syntax should look like this:

if (condition) {
  // something
}
else if (condition) {
  if (condition) {
    // dosomething 
  } 
  else {
    // dosomethingelse
  }
}