🔰compilation

🚧 施工中

JS ⟩ compile

3 stages of compilation:

JavaScript code is compiled first, and then execute. (not interpreted line by line)

while scopes are identified during compilation, they're not actually created until runtime (each time a scope needs to run).

compilation

  • doesn't do anything in terms of reserving memory for scopes and variables, none of the program has been executed yet.

  • creates a map of all the lexical scopes of the program.

runtime

Last updated