Where is the error code?


#1

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

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

compare("rock","rock");


#2

Hi Just add the ! after tie here

return "The result is a tie"

#3

I have the same problem, the code is right but doesn't work :confused:


#4

HI you can post your code or create a new topic with your code.


#5

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