5. Both choices are the same!


#1

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

Hi guys!, i don´t know what is wrong with my code, if somebody can help me, it give me this error:
"Oops, try again. There was a problem with your syntax"

Thx


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


#2

Hi there, just a simple fix here.

var compare = function( choice1, choice2 ); { // Sneaky curly brace

There's a sneaky semi-colon just to the left of the end curly brace preventing the rest of the code from executing correctly.


#3

this line:

var compare = function( choice1, choice2 ); {

you have an unnecassry semi-colon


#4

there is no need to put semicolon for that function


#5

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