Part 5, Oops, try again. Your compare function does not return 'The result is a tie!' when there is a tie


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-Bthev-mskY8/1/1?curriculum_id=506324b3a7dffd00020bf661


When I tried, it said:
Oops, try again.
Your compare function does not return 'The result is a tie!' when there is a tie.
What am I doing wrong?


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


#2

statement should be same what you are told to do

return "The result is tie!"; // you missed **a** // The result is **a** tie!

#3

What a silly mistake! Thanks for the help!


#4

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