What JavaScript Actually Is
JavaScript is a dynamically typed, garbage-collected, multi-paradigm programming language standardized as ECMAScript. The language itself does not define the DOM, fetch(), timers, or browser APIs. Those capabilities are provided by the host environment. A browser embeds a JavaScript engine such as V8, SpiderMonkey, or JavaScriptCore and exposes Web APIs around that engine. Node.js similarly embeds V8 but provides server-oriented APIs such as filesystem, networking, streams, and process management.
A useful mental model is: JavaScript is the language; the runtime is the language engine plus host-provided capabilities. This distinction explains why some APIs exist in browsers but not Node.js.
ECMAScript defines language behavior. The browser or Node.js provides the surrounding runtime APIs.
- JavaScript and the browser are not the same thing.
- ECMAScript specifies the language standard.
- Runtime APIs such as DOM and timers come from the host environment.
Which statement best describes JavaScript?