Expression vs statement

🏷️ Javascript

Expression produces a value

Function declaration: define a function without assigning to a variable

Function expression: define a function and assign to a variable

Function statement (function declaration)

Declaration is hoisted

Expression is not hoisted


https://javascriptweblog.wordpress.com/2010/07/06/function-declarations-vs-function-expressions/