JavaScript
JavaScript is a programming language whose core semantics are standardized as ECMAScript; browsers and server runtimes supply additional APIs around that language.
Not independently verified. References are provided for review; their presence does not certify every claim.
JavaScript
JavaScript is a programming language whose core semantics are standardized as ECMAScript; browsers and server runtimes supply additional APIs around that language.
Language, engine and runtime
The language defines values, expressions, objects, functions and execution rules. An engine implements these rules. A runtime combines an engine with host facilities: a browser exposes the DOM, while Node.js exposes server-oriented APIs. A browser API is not automatically part of ECMAScript.
JavaScript lets developers describe behavior rather than encode every instruction for a specific processor. Functions create execution contexts represented on the call stack. Work in a single agent executes one job at a time; host facilities coordinate timers, network completion and other asynchronous work.
A practical example
console.log("start");
Promise.resolve().then(() => console.log("promise"));
console.log("end");
The synchronous messages print before the promise reaction. The reaction runs later at a microtask checkpoint; the promise does not create a new operating-system thread. See the event loop for the scheduling mechanism.
Boundaries and common mistakes
Long synchronous work can block browser interaction even inside an async function. Awaiting a value permits continuation scheduling; it does not move computation to another core. Web Workers supply a separate execution context for appropriate browser computation.
Avoid executing strings received from users. Validate external values at a trust boundary and use safe document APIs when rendering them. Dynamic typing makes runtime checks particularly important.
Learning progression
First practice variables, functions, arrays and object identity. Then trace a function call and a promise reaction by hand. Assessment: explain which behavior comes from ECMAScript and which comes from the host. Continue with concurrency before comparing browser and server scheduling.
References and verification
These sources are provided for claim review. This article is Needs review; no verification date is asserted. Original research ranges, where available, are retained in the catalog.
- JavaScript execution model — MDN Web Docs.
- HTML Living Standard — Event loops — WHATWG.
References & provenance
MDN Web Docs · Official documentation · Needs review · Access date not recorded
- Agents, execution contexts, jobs and the event loop
WHATWG · Specification · Needs review · Access date not recorded
- Tasks, microtasks and rendering opportunities
Original research context, including questions and later corrections:
Research lines 10300–12352My learning
Your learning
Saved in this browser. Status and proficiency are independent.
Loading your saved workspace…