ECMAScript

Specification for Javascript and other programming languages


title: "ECMAScript" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["ecma-standards", "object-based-programming-languages", "programming-languages-with-an-iso-standard", "scripting-languages", "source-to-source-compilers"] description: "Specification for Javascript and other programming languages" topic_path: "technology/programming-languages" source: "https://en.wikipedia.org/wiki/ECMAScript" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Specification for Javascript and other programming languages ::

::data[format=table title="Infobox programming language"]

FieldValue
nameECMAScript
paradigmMulti-paradigm: prototype-based, functional, imperative
designerBrendan Eich, Ecma International
typingweak, dynamic
implementationsJavaScript, ActionScript, JScript, QtScript, InScript, Google Apps Script
website
year
influenced_bySelf, HyperTalk, AWK, C, CoffeeScript, Perl, Python, Java, Scheme
::

| name = ECMAScript | paradigm = Multi-paradigm: prototype-based, functional, imperative | designer = Brendan Eich, Ecma International | typing = weak, dynamic | implementations = JavaScript, ActionScript, JScript, QtScript, InScript, Google Apps Script | website = | year = | influenced_by = Self, HyperTalk, AWK, C, CoffeeScript, Perl, Python, Java, Scheme | name = ECMAScript (file format) | icon = Crystal source.svg | logo = | screenshot = | caption = | extension = .es | mime = application/ecmascript | type code = | uniform type = | magic = | owner = Sun Microsystems, Ecma International | released = | latest release version = Edition 15 | latest release date = | genre = Scripting language | container for = | contained by = | extensions = JavaScriptes | extended to = | standard = | url = Standards

ECMAScript (; ES){{cite book |last1 = Stefanov |first1 = Stoyan |title = JavaScript Patterns |url = https://books.google.com/books?id=WTZqecc9olUC |publisher = O'Reilly Media, Inc. |date = 2010 |page = 5 |isbn = 9781449396947 |access-date = 2016-01-12 |quote = The core JavaScript programming language [...] is based on the ECMAScript standard, or ES for short. |archive-date = 2016-06-10 |archive-url = https://web.archive.org/web/20160610005241/https://books.google.com/books?id=WTZqecc9olUC |url-status = live

ECMAScript is commonly used for client-side scripting on the World Wide Web, and is increasingly being used for server-side scripting and services using runtime environments such as Node.js, Deno and Bun.

ECMAScript, ECMA-262, JavaScript

ECMA-262, or the ECMAScript Language Specification, defines the ECMAScript Language, or just ECMAScript. ECMA-262 specifies only language syntax and the semantics of the core application programming interface (API), such as , , and , while valid implementations of JavaScript add their own functionality such as input/output and file system handling.

History

The ECMAScript specification is a standardized specification of a scripting language developed by Brendan Eich of Netscape; initially named Mocha, then LiveScript, and finally JavaScript. In December 1995, Sun Microsystems and Netscape announced JavaScript in a press release. In November 1996, Netscape announced a meeting of the Ecma International standards organization to advance the standardization of JavaScript. The first edition of ECMA-262 was adopted by the Ecma General Assembly in June 1997. Several editions of the language standard have been published since then. The name "ECMAScript" was a compromise between the organizations involved in standardizing the language, especially Netscape and Microsoft, whose disputes dominated the early standards sessions. Eich commented that "ECMAScript was always an unwanted trade name that sounds like a skin disease." ECMAScript has been formalized through operational semantics by work at Stanford University and the Department of Computing, Imperial College London for security analysis and standardization. "ECMA" stood for "European Computer Manufacturers Association" until 1994.

Evolution

Main article: ECMAScript version history

Ecma's Technical Committee 39 (TC39) is responsible for the maintenance of ECMAScript. New proposals to the language go through a staged process, with each stage representing the completeness of the proposal's specification. Consensus must be reached within the committee to advance a proposal to the next stage. Proposals that reach stage 4, the final stage, will be included into the next version of the standard. Since the release of version 6 in June 2015, new major versions have been finalized and published every June.

Features

Main article: ECMAScript syntax, JavaScript#Features

The ECMAScript language includes structured, dynamic, functional, and prototype-based features.

Imperative and structured

ECMAScript JavaScript supports C-style structured programming. Previously, JavaScript only supported function scoping using the keyword var, but ECMAScript 2015 added the keywords let and const, allowing JavaScript to support both block scoping and function scoping. JavaScript supports automatic semicolon insertion, meaning that semicolons that normally terminate a statement in C may be omitted in JavaScript.

Like C-style languages, control flow is done with the , , / , / , and statements. Functions are weakly typed and may accept and return any type. Arguments not provided default to .

Weakly typed

ECMAScript is weakly typed. This means that certain types are assigned implicitly based on the operation being performed. However, there are several quirks in JavaScript's implementation of the conversion of a variable from one type to another.

Dynamic

ECMAScript is dynamically typed. Thus, a type is associated with a value rather than an expression. ECMAScript supports various ways to test the type of objects, including duck typing.

Transpiling

Main article: JavaScript#transpilers

Since ES 2015, transpiling JavaScript has become very common. Transpilation is a source-to-source compilation in which newer versions of JavaScript are used, and a transpiler rewrites the source code so that it is supported by older browsers. Usually, transpilers transpile down to ES3 to maintain compatibility with all versions of browsers. The settings to transpile to a specific version can be configured according to need. Transpiling adds an extra step to the build process and is sometimes done to avoid needing polyfills. Polyfills create new features for older environments that lack them. Polyfills do this at runtime in the interpreter, such as the user's browser or on the server. Instead, transpiling rewrites the ECMA code itself during the build phase of development before it reaches the interpreter.

Conformance

In 2010, Ecma International started developing a standards test for Ecma 262 ECMAScript. Test262 is an ECMAScript conformance test suite that can be used to check how closely a JavaScript implementation follows the ECMAScript Specification. The test suite contains thousands of individual tests, each of which tests some specific requirement(s) of the ECMAScript specification. The development of Test262 is a project of the Ecma Technical Committee 39 (TC39). The testing framework and the individual tests are contributed to Ecma by member organizations of TC39.

Important contributions were made by Google (Sputnik test suite) and Microsoft, who both contributed thousands of tests. The Test262 test suite consisted of tests . ECMAScript specifications through ES7 are well-supported in major web browsers. The table below shows the conformance rate for current versions of software with respect to the most recent editions of ECMAScript.

::data[format=table title="Scripting engine conformance"]

Scripting engineReference application(s)ConformanceES5ES6 (2015)ES2016+NextSpiderMonkeyV8JavaScriptCore
Firefox 120100%98%98%5%
Google Chrome 117, Microsoft Edge 113, Opera 98100%98%98%5%
Safari 1799%100%98%11%
::

References

References

  1. (2020-05-02). "JavaScript: The First 20 Years". Proceedings of the ACM on Programming Languages.
  2. Wunder, C.. "Node.js — ECMAScript 2015 (ES6) and beyond".
  3. (14 December 2021). "Deno joins JavaScript standards effort".
  4. https://bun.sh/docs#:~:text=or%2C%20more%20formally%2C-,ECMAScript,-)%20is%20just%20a bun
  5. Guo, Shu-yu. (2022-02-14). "ECMAScriptÂŽ 2022 Language Specification".
  6. Krill, Paul. (2008-06-23). "JavaScript creator ponders past, future". InfoWorld.
  7. (1995-12-04). "Netscape and Sun announce JavaScript, the Open, Cross-platform Object Scripting Language for Enterprise Networks and the Internet". Netscape.
  8. Press Release. (November 15, 1996). "Industry Leaders to Advance Standardization of Netscape's JavaScript at Standards Body Meeting". Netscape.
  9. Eich, Brendan. (2006-10-03). "Will there be a suggested file suffix for es4?". Mail.mozilla.org.
  10. (2020-01-03). "An Operational Semantics for JavaScript". [[Association for Computing Machinery]].
  11. "TC39". Ecma International.
  12. "The TC39 Process". Ecma International.
  13. "ECMAScript, TC39, and the History of JavaScript". ui.dev.
  14. "About". ECMAScript.
  15. Flanagan, David. (17 August 2006). "JavaScript: The Definitive Guide". O'Reilly.
  16. (2017-02-16). "JavaScript data types and data structures – JavaScript {{pipe}} MDN".
  17. "ECMAScript Language – test262". Test262.ecmascript.org.
  18. (January 24, 2020). "tc39/test262".
  19. ES5 is the baseline for this test suite. The conformance rate for other editions reflects support for new features only, not a comprehensive score.
  20. (2024-04-14). "ECMAScript 5 compatibility table".
  21. (2024-04-14). "ECMAScript 6 compatibility table".
  22. (2024-04-14). "ECMAScript 2016+ compatibility table".
  23. (2024-04-14). "ECMAScript Next compatibility table".
  24. Composite score that includes new features from ES7 through next edition drafts

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

ecma-standardsobject-based-programming-languagesprogramming-languages-with-an-iso-standardscripting-languagessource-to-source-compilers