Help! I do not know what he wants


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????????


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


You spelled choice1 as choise1

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


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


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