Help! I do not know what he wants


#1

var compare = function(choice1, choice2) {
if(choise1 === choice2) {
return "The result is a tie";
}
};
This my code;

<<<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!">>>

And this is what he asked me to;

What am I doing wrong here????????


#2

What makes you say that you're doing something wrong? What is the problem?


#3

You spelled choice1 as choise1
Correct:

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

#4

it is supposed to be "choice1" not "choise1"
hope it helps.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.