#5 syntax error


#1

var compare = function(choice1, choice 2) {
if("choice1 === choice2") {
return("The result is a tie!")
}
};


#2

Remove the quotes from around choice1 === choice2 because it turns it into a string and therefore will not refer back to the function input. Also your spelling of choice2 is inconsistent, the 1st one has an extra space.


#3

If you can't understand that use this. No offence, but I also can't understand that.

/*var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
	computerChoice = "rock";
} else if(computerChoice <= 0.67) {
	computerChoice = "paper";
} else {
	computerChoice = "scissors";
} console.log("Computer: " + computerChoice);*/
var compare = function(choice1, choice2) {
    if(choice1 === choice2) {
    return "The result is a tie!";
    }
};