Wrote the same exact code but got wrong? function declarations


#1

I got to part 3 of this code and wrote it out right however i would still get it wrong and even the solution itself shows console error messages but showed it as right. Can anyone explain whats wrong? Thanks


function isGreaterThan(numberOne, numberTwo) {
  if (numberOne > numberTwo) {
    return true;
  }else{
    return false;
  }
console.log(isGreaterThan(5,7));

i tried “isGreaterThan(5,7);” first then corrected it to use the console log and still got it wrong.


#2

Remember to close the body of the function.


#3

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