Function declaration:
- appear in the global scope
- appear inside a function
Features: Hoisting
Available: Anywhere inside scope (global and local)
Function expression:
- can be assigned to a variable
- can be assigned to a property
- can appear in function invocations as parameters
Features: Closures, Callbacks, IIFE (Immediately Invoked Function Expressions)
Available: after the line it is declared
Top comments (0)