JS - Functions

Functions are reusable blocks of code. This section connects basic functions with callbacks and closure.

Core Notes

Mental Model

ConceptKey idea
function declarationnamed reusable function
function expressionfunction stored in a variable
arrow functionshorter syntax, different this behavior
callbackfunction passed into another function
closurefunction remembers outer scope