Help! Error for part 5?


#1

Instructions:
We carried over the code from the previous section, but it is a comment. Leave it there for now.
Below the comment, declare a function called compare.
It takes two parameters, choice1 and choice2.
Inside the function, write an if statement. If choice1 === choice2, then return "The result is a tie!"

I am not sure what I am doing wrong. Code is below:

/*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 = fuction (choice1, choice2) {
if(choice1 === choice2) {
return "The result is a tie!";
}
};


#2

You spelled function wrong, you put fuction.


#3

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