Standards and Dialects
JavaScript has several dialects and runtime environments that extend its capabilities beyond the browser. Here are some of the most notable ones:
JavaScript has evolved through several standard versions, each introducing new features and improvements. These versions are standardized by the ECMAScript (ES) specification. Here are the key versions:
ECMAScript
ECMAScript is the standard for JavaScript, defining the core features of the language. JavaScript is an implementation of ECMAScript, with additional features and APIs specific to web browsers.
ECMAScript 1 (ES1) - 1997
The first edition of ECMAScript, establishing the core features of the language.
ECMAScript 2 (ES2) - 1998
A minor update to align with the ISO/IEC 16262 international standard.
ECMAScript 3 (ES3) - 1999
Introduced regular expressions, better string handling, new control statements, and try/catch exception handling.
ECMAScript 5 (ES5) - 2009
Added "strict mode", JSON support, new array methods, and property accessors. It also improved object properties and introduced Object.create
.
ECMAScript 6 (ES6) / ECMAScript 2015
A major update that introduced classes, modules, arrow functions, template literals, let
and const
keywords, promises, and many other features.
ECMAScript 2016 (ES7)
Introduced the exponentiation operator (**)
and Array.prototype.includes
.
ECMAScript 2017 (ES8)
Added async/await
, Object.entries
, Object.values
, and string padding methods.
ECMAScript 2018 (ES9)
Introduced rest/spread properties for objects, asynchronous iteration, and Promise.prototype.finally
.
ECMAScript 2019 (ES10)
Added Array.prototype.flat
, Array.prototype.flatMap
, Object.fromEntries
, and String.prototype.trimStart/trimEnd
.
ECMAScript 2020 (ES11)
Introduced BigInt
, dynamic import()
, nullish coalescing operator (??)
, and optional chaining operator (?.)
.
ECMAScript 2021 (ES12)
Added logical assignment operators (&&=
, ||=
, ??=
), String.prototype.replaceAll
, and Promise.any
.
ECMAScript 2022 (ES13)
Introduced class fields
, private methods
, top-level await
, and Error.cause
.
Each version builds upon the previous ones, adding new features and improving the language's capabilities.
Node.js
Node.js is a runtime environment that allows JavaScript to be run on the server side. It uses the V8 JavaScript engine, which is also used by Google Chrome. Node.js provides a rich library of various JavaScript modules to simplify the development of server-side applications.
Key Features:
Asynchronous and event-driven
Non-blocking I/O
NPM (Node Package Manager) for managing packages
Widely used for building scalable network applications
Bun
Bun is a modern JavaScript runtime that aims to be a fast and efficient alternative to Node.js. It is built from scratch to focus on performance and developer experience.
Key Features:
Fast startup and execution times
Built-in support for TypeScript and JSX
Includes a bundler, transpiler, and package manager
Compatible with Node.js APIs
Deno
Deno is a secure runtime for JavaScript and TypeScript that is built on the V8 engine and Rust. It was created by Ryan Dahl, the original creator of Node.js, to address some of the design issues he identified in Node.js.
Key Features:
Secure by default (sandboxed environment)
Supports TypeScript out of the box
Built-in utilities for testing, formatting, and linting
Uses ES modules instead of CommonJS
No
package.json
or centralized package manager (uses URL imports)
Each of these environments has its own strengths and use cases, making them suitable for different types of projects and development workflows.