Skip to content
BENIBIX Learn

JavaScript Engine

Development⚙️ Compilers & RuntimesRuntimes

Also known as JS Engine, V8, JavaScriptCore, SpiderMonkey

The program that runs JavaScript code. V8 is the best known.

Think of it like

Think of it like the motor in a car. The runtime is the rest of the car.

Example

Jack's code runs in both Chrome and Node.js, because both use V8. Node.js adds files and the network, which Chrome keeps away from web pages.

Why it matters

The engine decides how fast your JavaScript runs. Knowing which one sits under a runtime tells you a lot about how it will behave.

Definition

A JavaScript engine is the program that reads and runs JavaScript code. It parses the code, runs it, and compiles the busy parts to machine code as it goes. Chrome and Node.js use the V8 engine. Safari and Bun use JavaScriptCore, and Firefox uses SpiderMonkey. An engine runs the language only. A browser or a runtime adds files, the network or the page around it.
Both Node.js and Deno sit on V8, and Bun sits on JavaScriptCore.

Common mistake

Thinking the engine and the runtime are one thing. V8 alone cannot read a file. Node.js is what adds that.

Key takeaways

  1. 1
    Runs the language. Parses, runs and compiles.
  2. 2
    Several exist. V8, JavaScriptCore, SpiderMonkey.
  3. 3
    Needs a host. A browser or a runtime.