Exercise 5 help please!


I can not find where in my code is the error.


The error message i get is:
Oops, try again. Did you create a function called compare?

var compare = function(choise1, choice2) {
    return "The result is a tie!"}


Look at how you spelled choise1 in your parameters, and choise2 in your if statement. They’re spelled incorrectly. Also, there’s a semicolon (;) that’s making your if statement not execute. Do you see the problem? :slight_smile:


oh my god how stupid am i!spelled choice wrong…thanks!!


But still when i change that the error message is:

Oops, try again. There was a problem with your syntax.

Now my code looks like this:

var compare = function(choice1, choice2){
return “The result is a tie!”


No, your first code was just fine (with correct spelling). You just needed to remove the semicolon. Do you know what I mean?


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