⚖️static vs. dynamic scoping
JS ⟩ concepts ⟩ scope ⟩ static vs. dynamic scoping
When resolving identifier(s),
static scope: cares the where the variable is declared. ( scopes are determined at compile-time❗)
dynamic scope: cares the when the function is invoked. ( the resolving happens at runtime❗)
Last updated