5. Both choices are the same!



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"


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


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.


this line:

var compare = function( choice1, choice2 ); {

you have an unnecassry semi-colon


there is no need to put semicolon for that function


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