An expression is a JavaScript construct that evaluates to a value. Expressions can appear inside larger expressions or statements. A function declaration must stand alone as a statement; a function expression appears as part of another statement, such as an assignment or function call. section 5.1.1
Functions can be written as expressions, assigned to variables, passed as arguments, or returned from other functions. Arrow functions provide another expression form: a concise body can return an expression’s value without braces or an explicit return. section 5.1.1 section 5.1.2
Listing 5.3 Comparing an arrow function and a function expression
const greet = name => "Greetings " + name; #A
console.assert(greet("Oishi") === "Greetings Oishi",
"Oishi is properly greeted");
const anotherGreet = function(name){ #B
return "Greetings " + name; #B
}; #B
console.assert(anotherGreet("Oishi") === "Greetings Oishi",
"Again, Oishi is properly greeted");
Compare an arrow function with a function expression that both greet a name. section 5.1.2













