Main Features
- object-oriented dynamic scripting language
- prototype based inheritance
- interpreted and JIT compiled
- single-threaded : Core JS has 1 call stack
JS Engine :
- program that executes code and converts it into machine readable format.
- Popular - V8 (Chromium , NodeJS), Spidermonkey (firefox)
- V8 engine is an open source high-performance, written in C++. It combines interpreter and compiler together

Parts of Engine
- Parser : scans script, checks errors and breaks it up into tokens. It creates a AST — a tree graph of source code
- Interpreter : used at 1st execution. Executes code line by line and converts them into bytecode
- Profiler: watches for frequently executed code (HOT code) and passes to compiler for optimisations and re-optimisations.
- JIT Compiler: compiles & optimise hot code into machine code. It is mixed with bytecode and given to computer.
- Engine Memory — made of 2 parts
- heap memory to store objects in unordered way
- stack
- to store execution contexts, primitives and references to objects.
- It is initialised with global context. Functions are ran by placing their contexts on stack.