Scope
Wo im Code eine Variable sichtbar ist — Block-Scope, Funktions-Scope, globaler Scope.
let und const sind in JS block-scoped; das alte var ist funktions-scoped (verwirrend). Lexical Scope = bestimmt durch die Position im Code; Dynamic Scope (Bash) = bestimmt durch den Aufrufer. Closures fangen den Scope für spätere Verwendung ein.