Code not working


#1

Hi all,
I am doing the “Both choices are same section”. I have written the following code:

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


I get the error message: Oops, your compare function does not return ‘The result is a tie’ when there is a tie. Please help me out proceed further


#2

You forgot to end your sentence in your string ('The result is a tie') with an exclamation mark ( ! ). Yep, Codecademy wants it to look just like their sentence.


#3

Lol that was silly, Thanks


#4

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