I'm not seeing why my code is not passing

link: agreeOrDisagree()

function agreeOrDisagree(tall, bigFoot) {
if (tall === bigFoot);{
return “I agree!”; }

{ return ‘I disagree’;
}
};

There shouldn’t be a semi-colon on this line. Since the semi-colon denotes the end of a statement, it prematurely ends your if statement. This means that, whether or not your condition is true, the code inside the if block will not execute.

There is no need to surround the return statements with curly braces or to add a semi-colon after the closing curly brace of the function. I encourage you to check the documentation for functions here to gain a better understanding of the syntax.

1 Like

thank you! I’ll work on the functions

1 Like