Code not working


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


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.


Lol that was silly, Thanks


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