JavaScript
Last reviewed
May 4, 2026
Sources
20 citations
Review status
Source-backed
Revision
v1 ยท 4,080 words
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation.
Last reviewed
May 4, 2026
Sources
20 citations
Review status
Source-backed
Revision
v1 ยท 4,080 words
Add missing citations, update stale details, or suggest a clearer explanation.
JavaScript (often abbreviated JS) is a high-level, dynamically typed, multi-paradigm programming language that, alongside HTML and CSS, forms one of the three core technologies of the World Wide Web. Originally created to make web pages interactive, it has grown into a general-purpose language that runs in web browsers, on servers via runtimes such as Node.js, Deno, and Bun, in mobile and desktop applications, and in serverless edge environments. The language is standardized as ECMAScript by Ecma International's TC39 committee and is implemented by every major browser vendor.
Designed by Brendan Eich at Netscape Communications Corporation in May 1995, JavaScript supports first-class functions, prototype-based object orientation, lexical closures, and event-driven asynchronous programming. It is a curly-brace language with C-like syntax that nonetheless borrows heavily from Self, Scheme, and HyperTalk. The language has gone through nearly three decades of evolution, with the major modernization landing in ECMAScript 2015 (ES6) and a yearly release cadence continuing through ECMAScript 2025.
In the artificial intelligence era, JavaScript and its statically typed superset TypeScript have become central to how developers build user-facing AI products. The major model providers, including OpenAI, Anthropic, and Google, publish first-class JS/TS SDKs. Frameworks such as Next.js, the Vercel AI SDK, and LangChain.js dominate the surface layer of agentic web applications, while libraries like Transformers.js and WebLLM run language models directly inside the browser using WebGPU. Anthropic's December 2025 acquisition of the Bun runtime further cemented the language's position at the heart of AI coding infrastructure.
| Field | Value |
|---|---|
| Designed by | Brendan Eich |
| Developer | Netscape Communications, Mozilla Foundation, Ecma International TC39 |
| First appeared | December 4, 1995 |
| Stable release | ECMAScript 2025 (16th edition), June 25, 2025 |
| Typing discipline | Dynamic, weak, duck |
| File extensions | .js, .mjs, .cjs, .jsx |
| Influenced by | Self, Scheme, Java, AWK, HyperTalk, Lua, Perl |
| Influenced | TypeScript, ActionScript, AssemblyScript, CoffeeScript, Dart, Haxe |
| Major implementations | V8, SpiderMonkey, JavaScriptCore, Hermes, QuickJS |
| License | Open standard, ECMA-262 / ISO/IEC 16262 |
| Website | developer.mozilla.org/en-US/docs/Web/JavaScript |
In the spring of 1995, Netscape Communications was racing to add a scripting capability to its Navigator browser before the Navigator 2.0 release scheduled for September. The company hired Brendan Eich, who had been recruited with the promise that he would work on a Scheme-like language for the browser. Once he arrived, management instead asked him to design something that would resemble Java, which Sun Microsystems was preparing to launch and which had captured the attention of the industry.
Eich prototyped the first implementation of the language and its interpreter in roughly ten contiguous days in May 1995. The internal codename was Mocha. In September 1995 the language shipped in a Navigator 2.0 beta under the name LiveScript. On December 4, 1995, Netscape and Sun Microsystems issued a joint press release renaming the language JavaScript as part of a marketing arrangement that allowed Netscape to bundle the Java runtime with Navigator. The naming has caused confusion ever since, despite the two languages sharing little beyond superficial syntax.
For most of 1995 and 1996, Eich was the only Netscape engineer working full-time on the language and its engine.
Microsoft reverse-engineered Netscape's implementation and shipped its own variant, JScript, in Internet Explorer 3.0 on August 13, 1996. To prevent further fragmentation, Netscape submitted the language to Ecma International in November 1996. The Ecma General Assembly adopted the first edition of ECMA-262, the standard that defines the ECMAScript language, in June 1997. ISO/IEC fast-tracked the same specification as ISO/IEC 16262 in April 1998.
ECMAScript 2 (1998) brought the standard into alignment with ISO/IEC 16262 with editorial changes only. ECMAScript 3 (December 1999) added regular expressions, try/catch exception handling, better string handling, and tighter error definitions. ES3 became the de facto baseline of web JavaScript for most of the next decade.
Work on a major fourth edition began in the early 2000s but stalled amid disagreements between vendors over scope. The proposed ECMAScript 4 was eventually abandoned in 2008. ECMAScript 5 was ratified in December 2009 and added strict mode, getters and setters, native JSON parsing, and a number of array methods such as map, filter, and reduce.
On November 8, 2009, Ryan Dahl presented Node.js at the inaugural JSConf EU in Berlin. Built on Google's V8 engine, Node.js coupled JavaScript with non-blocking I/O via the libuv library, making it possible to write high-concurrency network servers in the language for the first time. Within a few years Node.js became the foundation for an enormous ecosystem of build tools, package managers (npm), and server frameworks. Governance of the project moved from the Node.js Foundation to the OpenJS Foundation in 2019 after a merger with the JS Foundation.
ECMAScript 2015, also known as ES6, was ratified in June 2015 and represents the largest single update in the language's history. It introduced let and const block scoping, classes, arrow functions, default and rest parameters, template literals, destructuring, native modules, Promises, Maps and Sets, Symbols, generators, and a great deal more. After ES6, TC39 adopted an annual ratification cadence in June of each year, with proposals advancing through a Stage 0 to Stage 4 maturity process.
| Edition | Year | Notable additions |
|---|---|---|
| ES1 | 1997 | Original ECMA-262 specification |
| ES2 | 1998 | Editorial alignment with ISO/IEC 16262 |
| ES3 | 1999 | Regex, try/catch, switch, do-while |
| ES5 | 2009 | Strict mode, JSON, array iteration methods |
| ES2015 (ES6) | 2015 | let/const, classes, arrow functions, modules, Promises |
| ES2016 | 2016 | Array.prototype.includes, exponentiation operator |
| ES2017 | 2017 | async / await, Object.entries, Object.values |
| ES2018 | 2018 | Async iteration, rest/spread for objects |
| ES2019 | 2019 | Array.flat, Array.flatMap, optional catch binding |
| ES2020 | 2020 | Optional chaining, nullish coalescing, BigInt, dynamic import |
| ES2021 | 2021 | Logical assignment, String.replaceAll, WeakRef |
| ES2022 | 2022 | Top-level await, class fields, Error.cause |
| ES2023 | 2023 | Array find from last, Hashbang grammar |
| ES2024 | 2024 | Object.groupBy, Promise.withResolvers, RegExp /v flag |
| ES2025 | 2025 | Iterator helpers, JSON modules, Float16Array, Promise.try, RegExp.escape |
In 2018, at JSConf EU, Ryan Dahl gave a talk titled "10 Things I Regret About Node.js" and announced Deno as a successor runtime. Deno reached its 1.0 release on May 13, 2020, with built-in TypeScript support, a permissions-based security model, and standard library modules served over the web. Jarred Sumner began work on Bun in 2021 and released Bun 1.0 on September 8, 2023. Bun is written in the Zig language, uses Apple's JavaScriptCore engine, and bundles a runtime, package manager, bundler, and test runner into a single binary. In December 2025 Anthropic announced its acquisition of Bun, the company's first acquisition, framed around accelerating Claude Code and the Claude Agent SDK while keeping the runtime open source under the MIT license.
JavaScript is a multi-paradigm language that supports imperative, object-oriented, and functional styles. The runtime is single-threaded and built around an event loop that processes a queue of tasks and microtasks. Long-running or CPU-intensive work can be offloaded to Web Workers in the browser or worker threads in Node.js.
Functions in JavaScript are first-class values: they can be assigned to variables, passed as arguments, returned from other functions, and stored in data structures. Lexical closures capture variables from the enclosing scope and remain a foundational technique for module patterns, callbacks, and state encapsulation.
Unlike class-based languages such as Java, JavaScript objects inherit directly from other objects through a prototype chain. The class syntax introduced in ES6 is syntactic sugar over the underlying prototype mechanism. Property access is dynamic, and any object can be extended at runtime.
Variables hold values of any type and may be reassigned to a different type at any point. Implicit type coercion converts values between types when operators expect particular kinds of operands, which is the source of many of the language's well known surprises. The strict equality operator === avoids coercion and is recommended for almost all comparisons.
The language is single-threaded, so concurrency is expressed through asynchronous APIs. Callbacks were the original mechanism, followed by Promises in ES2015 and the async / await syntax in ES2017. ES2018 added asynchronous iteration. The combination of async / await with for await...of loops makes streaming and backpressure-aware code, which is common in AI applications, considerably easier to write.
Two module systems are in widespread use. CommonJS, with its require and module.exports calls, was popularized by Node.js. ECMAScript Modules (ESM), with import and export statements, are the standard format defined by the language and supported natively by browsers, Node.js, Deno, and Bun. Files using ESM typically carry the .mjs extension, while .cjs files signal CommonJS.
The language has accumulated a wide range of ergonomic features over the past decade, including spread and rest, destructuring assignment, template literals and tagged templates, generators, iterators, Symbols, Proxy and Reflect for metaprogramming, WeakMap, WeakSet, and WeakRef for memory-sensitive references, BigInt for arbitrary-precision integers, optional chaining (?.) and nullish coalescing (??), logical assignment operators, and top-level await in modules.
A JavaScript engine is a program that executes JavaScript source code, typically by parsing it into an abstract syntax tree, compiling it to bytecode, and then optimizing hot code paths through just-in-time compilation. The major engines power browsers, embedded environments, and server runtimes.
| Engine | Vendor | Primary use |
|---|---|---|
| V8 | Chrome, Edge, Node.js, Deno, Cloudflare Workers, Vercel Edge Runtime | |
| SpiderMonkey | Mozilla | Firefox |
| JavaScriptCore (Nitro) | Apple | Safari, WebKit-based browsers, Bun |
| Chakra | Microsoft | Legacy Edge (deprecated after 2020 Chromium switch) |
| Hermes | Meta | React Native mobile applications |
| QuickJS | Fabrice Bellard | Embedded systems and small footprint hosts |
V8 was first shipped in Chrome on September 2, 2008, and is now used by Chromium-based browsers including Microsoft Edge as well as by Node.js, Deno, Cloudflare Workers, and the Vercel Edge Runtime. SpiderMonkey, the original Netscape engine, continues to power Firefox and Thunderbird. JavaScriptCore powers Safari and is also the engine used by Bun. Hermes is Meta's open-source engine optimized for the constrained environments of mobile devices, where its ahead-of-time bytecode compilation produces smaller bundles and faster startup. QuickJS is a small, embeddable engine written by Fabrice Bellard.
Server runtimes wrap a JavaScript engine with system APIs for filesystem access, networking, processes, and modules. They provide the host environment that allows JavaScript to run outside the browser.
| Runtime | First release | Engine | Created by |
|---|---|---|---|
| Node.js | May 27, 2009 | V8 | Ryan Dahl, now stewarded by the OpenJS Foundation |
| Deno | May 13, 2020 (1.0) | V8 | Ryan Dahl and Bert Belder |
| Bun | September 8, 2023 (1.0) | JavaScriptCore | Jarred Sumner |
| Cloudflare Workers | September 2017 | V8 isolates | Cloudflare |
| Vercel Edge Runtime | 2021 | V8 isolates | Vercel |
Node.js remains the largest server-side JavaScript runtime by a wide margin, with the npm registry hosting more than three million packages. Its release line follows a six-month cadence, with even-numbered major versions promoted to long-term support (LTS).
Deno embraces web platform APIs (fetch, URL, Web Streams) on the server, ships TypeScript support out of the box, and requires explicit permissions for filesystem, network, and environment access. Bun emphasizes raw performance, faster install times, and a unified developer toolchain. All three runtimes have converged around interoperability with Node.js packages.
Edge runtimes such as Cloudflare Workers and the Vercel Edge Runtime use V8 isolates rather than full Node.js processes, giving them sub-millisecond cold starts at the cost of a more limited subset of Node.js APIs. They are widely used to host streaming endpoints for AI chat applications.
ECMAScript is governed by Ecma International's Technical Committee 39 (TC39), with active participation from Apple, Google, Microsoft, Mozilla, Meta, Igalia, Bloomberg, and many other organizations. The committee meets several times a year and operates on a consensus model.
Proposals advance through five stages:
| Stage | Name | Meaning |
|---|---|---|
| Stage 0 | Strawperson | Initial idea, free-form exploration |
| Stage 1 | Proposal | Formal champion, problem statement, illustrative examples |
| Stage 2 | Draft | Specification text in formal language |
| Stage 2.7 | Specification ready for review | Awaiting test coverage and final review |
| Stage 3 | Candidate | Specification text complete; implementations expected |
| Stage 4 | Finished | Two compatible implementations, integrated test262 tests, ready for inclusion in next edition |
A snapshot of the specification is taken in March of each year, and the General Assembly ratifies it in June. This predictable cadence allows the language to evolve in small, well-tested increments.
The JavaScript ecosystem is among the largest in software, with frameworks for nearly every category of application. The list below covers the most widely used projects as of 2025.
| Category | Project | Notes |
|---|---|---|
| Frontend library | React | Created by Jordan Walke at Facebook, open-sourced May 2013 |
| Frontend framework | Vue.js | Created by Evan You, publicly announced February 2014 |
| Frontend framework | Angular | Released by Google in 2016 as a TypeScript rewrite of AngularJS (2010) |
| Frontend framework | Svelte | Created by Rich Harris, first released November 2016 |
| Frontend library | Solid | Fine-grained reactivity, by Ryan Carniato |
| Frontend library | Preact | Lightweight React-compatible alternative |
| Web component library | Lit | Maintained by Google for building web components |
| Meta-framework | Next.js | React-based, by Vercel; first released October 2016 |
| Meta-framework | Nuxt | Vue-based meta-framework |
| Meta-framework | SvelteKit | Official application framework for Svelte |
| Meta-framework | Remix | React framework, acquired by Shopify in 2022 |
| Meta-framework | Astro | Multi-framework site builder with islands architecture |
| Mobile | React Native | Cross-platform mobile by Meta, first released 2015 |
| Mobile | Ionic | Hybrid mobile apps using web views |
| Mobile | NativeScript | Native mobile apps from JavaScript |
| Desktop | Electron | Created at GitHub in 2013 to power the Atom editor |
| Desktop | Tauri | Rust-based alternative to Electron |
| Build tool | Webpack | Module bundler, dominant for most of the 2010s |
| Build tool | Vite | Fast dev server using esbuild and Rollup, by Evan You |
| Build tool | esbuild | Go-based bundler, by Evan Wallace |
| Build tool | Rollup | ESM-focused bundler |
| Build tool | Turbopack | Rust-based bundler, by Vercel |
| Build tool | Parcel | Zero-configuration bundler |
| Test framework | Jest | Created by Meta |
| Test framework | Mocha | Long-established test runner |
| Test framework | Vitest | Vite-native test runner |
| Test framework | Playwright | End-to-end testing by Microsoft |
| Test framework | Cypress | Browser-based end-to-end testing |
JavaScript and TypeScript occupy a peculiar position in the AI stack. Heavy model training and most research code is written in Python, but almost every interface that exposes a model to a user is built in JavaScript. The widespread browser deployment surface, the streaming-friendly async primitives in the language, and the dominance of Next.js for production web applications have all combined to make JS/TS the default language for chat UIs, agent runtimes, and connector tooling.
A growing class of libraries runs models directly in the browser without a backend server, taking advantage of WebGPU for GPU acceleration and WebAssembly for portable CPU execution.
| Project | Maintainer | Purpose |
|---|---|---|
| TensorFlow.js | Machine learning in the browser and Node.js using WebGL/WebGPU/WASM | |
| Transformers.js | Hugging Face | Run Transformers models in browsers and Node-compatible runtimes via ONNX Runtime |
| ONNX Runtime Web | Microsoft | Browser-compatible ONNX inference with WebGPU and WASM backends |
| WebLLM | MLC AI | High-performance in-browser LLM inference engine using WebGPU and the MLC compiler stack |
| WebAssembly | W3C | Portable bytecode runtime, often paired with WebGPU for in-browser inference |
Transformers.js (v3 added WebGPU support in 2024) lets developers run text classification, embeddings, automatic speech recognition, image generation, and small language models entirely client-side. WebLLM, developed by the same team that created MLC LLM, supports models such as Llama, Qwen, Phi, and Mistral running on a user's GPU through WebGPU, with retained performance reportedly approaching native execution on the same device.
| Project | Language | Description |
|---|---|---|
| LangChain.js | TypeScript | JS port of the LangChain framework for building agentic applications |
| LlamaIndex.ts | TypeScript | TypeScript version of LlamaIndex for retrieval-augmented generation |
| Vercel AI SDK | TypeScript | Provider-agnostic SDK for streaming chat UIs across React, Vue, Svelte, and Angular |
| Mastra | TypeScript | Workflow and agent framework |
| Inkeep, CopilotKit | TypeScript | UI-focused agent and chat frameworks |
The Vercel AI SDK has emerged as a particularly common choice for production chat applications, exposing a unified streamText and generateText interface that abstracts over OpenAI, Anthropic, Google, and other providers and integrates cleanly with Next.js Server Components and React Server Actions.
Every major model provider publishes an official JavaScript or TypeScript SDK that mirrors its Python counterpart. Examples include the openai npm package, the @anthropic-ai/sdk package for Claude, @google/generative-ai for Gemini, and similar packages from Mistral, Cohere, Groq, and Together AI. These SDKs typically support both streaming and non-streaming usage, function (tool) calling, structured outputs, and prompt caching where the underlying API exposes it.
The Model Context Protocol (MCP), open-sourced by Anthropic in November 2024, defines a standard way for AI applications to expose tools and data to language models. Both the official MCP TypeScript SDK and a large fraction of community reference servers are written in TypeScript and distributed via npm.
AI coding tools including Cursor, Claude Code, GitHub Copilot, Windsurf, and Vercel's v0 generate predominantly JavaScript and TypeScript when targeting web and mobile applications. Anthropic's December 2025 acquisition of Bun was framed by the company as a way to make Claude Code faster and more reliable, since the tool is itself written in JavaScript and depends critically on the speed of its underlying runtime.
JavaScript has held the top spot in the Stack Overflow Developer Survey "most-used programming language" category every year since the survey began in 2011. In the 2024 edition, 62% of professional developers reported using it, ahead of HTML/CSS at 53% and Python at 51%.
GitHub's annual Octoverse report tracks language activity across the platform's open-source repositories. JavaScript was the most-used language on GitHub for roughly a decade through 2023. In Octoverse 2024 (published October 2024), Python edged ahead, driven by an explosion in data science and machine learning activity, with JavaScript in second place and TypeScript rising rapidly. By August 2025, GitHub reported that TypeScript had become the most-used language on the platform for the first time, an outcome closely tied to the AI-driven popularity of TypeScript-first frameworks such as Next.js.
The HTTP Archive Web Almanac and similar surveys consistently find that more than 98% of websites execute some amount of JavaScript on the client, making it by some measures the most widely deployed programming language ever written.
JavaScript is widely used and just as widely criticized. Common complaints include:
Long-standing complaints about packaging, dependency size, and the build tool churn of the 2010s have eased somewhat with the consolidation around Vite, esbuild, and Bun, the broader adoption of native ESM, and the gradual stabilization of Node.js APIs.
TypeScript, released by Microsoft in 2012, is a strict superset of JavaScript that adds optional static types, interfaces, generics, enums, and a structural type system. TypeScript code compiles to plain JavaScript and runs on every JavaScript engine.
| Aspect | JavaScript | TypeScript |
|---|---|---|
| Typing | Dynamic, weak | Static (compile-time), structural |
| Tooling | Direct execution | Compiler (tsc), type checker, language server |
| Runtime overhead | None | None (types are erased) |
| First release | December 1995 | October 2012 |
| Standardization | Ecma International TC39 | Microsoft, open-source under Apache 2.0 |
| Best fit | Quick scripts, browser snippets, learning | Large codebases, AI agents, library development |
TypeScript adoption has accelerated sharply, especially in the AI tooling ecosystem. Most of the major AI SDKs (Vercel AI SDK, LangChain.js, LlamaIndex.ts, the MCP TypeScript SDK), the major React meta-frameworks, and most code generated by AI assistants are TypeScript-first. By the 2024 Stack Overflow survey, TypeScript ranked among the top five most-used languages, and as of August 2025 it was the single most-used language on GitHub.
In practice, the choice between the two is rarely binary. TypeScript files import freely from JavaScript files and vice versa, and most projects mix both. Modern runtimes including Deno and Bun execute TypeScript directly without an explicit compile step, and Node.js has been adding similar capabilities through its --experimental-strip-types flag.
JavaScript intersects with virtually every other topic in modern software. Related articles cover TypeScript, Node.js, Deno, Bun, React, Next.js, Vue.js, Angular, Svelte, WebAssembly, Vercel, and the Vercel AI SDK.