Choice1 === Choice2 do not return "The result is a tie" :(


#1


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


Do I write the code in a wrong way?
Oops, try again. Your compare function does not return 'The result is a tie!' when there is a tie.


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


#2

HI this line

return "The result is a tie";

just add the ! after tie(in the string)


#3

Oh, thank you very much! :slight_smile:


#4

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