component of JavaScript Engine
Parsing
- Tokenizing by Syntax parser =>
AST
(abstract syntax tree) JIT
compilation
JavaScript : Interpreted or Compiler
- depends upon
js engine
Compilation
- Just In Time compilation happens when
AST
is passed to interpreter and it can talk with compiler to check if it is optimized. - Memory heap stores variables
- Garbage collection constantly checks for free memories. (uses mark and sweep algorithm)