Where variables are visible: global, function, block.
- global scope: declared outside any function
- function scope: visible only inside the function
- block scope:
let/constare visible only inside{ } - inner scopes can read outer variables (lexical scope)
See examples/.
Predict what a nested-scope snippet prints.