Rock, Paper, Scissors part 5


#1


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


I have looked at the hint and checked each line of my code, but it says that "Your compare function does not return 'The result is a tie!' when there is a tie.". Im sure my code is correct and it should return the result is a tie upon execution.


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


#2

Make sure your text string matches what they want exactly.


#3

I had the same problem in the beginning, you're missing "!" at the end of tie


#4

I have the same problem here. it says "Your compare function does not return 'The result is a tie!' when there is a tie.". here is my code

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


#5

Somebody please help!


#6

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