In this exercise, function declarations are explained. It says to create a function declaration, and this is the output:
const isGreaterThan = (numberOne, numberTwo) => {
if(numberOne > numberTwo){
return true;
} else {
return false;
}
};
But it seems that this is not a function declaration; it is a function expression. For one, function declarations do not end in a semicolon (as specified in this lesson), but this example does. Secondly, it uses arrow function syntax.
In the subsequent lesson, 8/10, it says:
Also note function expressions end with a semi-colon since they are stored in a variable.
In this lesson, we have primarily been using a type of function expression known as an arrow function. Arrow function syntax is a shorter syntax for a function expression. You can identify arrow functions through the use of parentheses and the arrow token () =>.
Am I misunderstanding something?