JavaScript engine
The part of a browser or runtime that reads JavaScript code and executes it.
In more detail
Examples include V8 in Chrome and Node.js, SpiderMonkey in Firefox and JavaScriptCore in Safari. Engines compile frequently run code to fast machine code while it runs, and manage the call stack and memory, including garbage collection. The engine runs the language itself, while features such as the event loop, files, networking and web APIs come from the browser or runtime around it.
Related terms
- call stack — The region of memory where a running program keeps one frame for each function call that has started but not yet returned.
- garbage collection — The automatic freeing of memory held by objects that the program can no longer reach.
- V8 — Google's open-source JavaScript engine, used by Chrome and Node.js to parse, compile and run JavaScript.
- JavaScript runtime — The environment that runs JavaScript programs, combining a JavaScript engine with extra features such as files, networking and timers.
Taught in
- The Browser Event Loop: Call Stack, Microtasks And Macrotasks — Frontend Architecture & Web Platform
- Memory Management: Garbage Collection, Memory Leaks And WeakMap — Frontend Architecture & Web Platform
- V8 Engine & JIT Pipeline: Bytecode & Turbofan — Node.js Internals & Backend Services