Please enable JavaScript.
Coggle requires JavaScript to display documents.
Scope & Closures: What's the scope? (Compile theory has 3 stages…
Scope & Closures: What's the scope?
JS tipically classified as interpreted scripting language
But It is compiled language
Required: Two Phases
parsing/compiling
three program characteristics
early errors
strict mode
hoisting
block-scoped variable
syntax errors
Parsing entire program
find errors before execute
executing
Compile theory has 3 stages
Parsing
Abstract Syntax Tree AST var a = 2;
Identifier
VariableDeclaration
AssignmentExpression
Tokenizing/Lexing
Code Generation
Compiler speak
Think target = source
Identify targets and sources
Metaphor to think Lexical Scope
Marbles green
Variables
Bucket Green
function/blocks