Articulo de referencia

ECMAScript

[[Ecma International]]"},"released":{"wt":"{{Start date and age|1997|06}}"},"latest release version":{"wt":"Edition 16"},"latest release date":{"wt":"{{start date and age|2025|0...

ECMAScript ( / ˈ ɛ k m ə s k r ɪ p t / ; ES ) [ 1 ] es el estándar para el lenguaje JavaScript , destinado a garantizar la interoperabilidad de las páginas web en diferentes navegadores web . [ a ] ​​[ 2 ] Está estandarizado por el comité técnico TC39 de Ecma International en el documento ECMA-262 , con las API i18n ("Intl") estandarizadas en el documento ECMA-402 . [ 3 ]

ECMAScript se usa comúnmente para la programación del lado del cliente en la World Wide Web , y cada vez se usa más para la programación del lado del servidor y los servicios que utilizan entornos de ejecución como Node.js , [ 4 ] Deno [ 5 ] y Bun . [ 6 ]

El estándar ECMAScript no incluye ninguna función de entrada/salida (E/S), como redes , almacenamiento o gráficos . En la práctica, el navegador web u otro sistema de ejecución proporciona API de JavaScript para la E/S.

Estándares

El Comité Técnico 39 de Ecma International publica múltiples estándares que definen JavaScript , formalmente conocido como ECMAScript. Estos incluyen la sintaxis del lenguaje, la semántica, las bibliotecas y las tecnologías complementarias que lo soportan. [ 7 ] [ 8 ] Los estándares se detallan a continuación.

Especificación del lenguaje ECMAScript (ECMA-262)

Define el lenguaje JavaScript, formalmente conocido como ECMAScript. [ 9 ] ECMA-262 solo especifica la sintaxis del lenguaje y la semántica de la interfaz de programación de aplicaciones ( API ) principal, como Array, Function, y globalThis, mientras que las implementaciones válidas de JavaScript agregan su propia funcionalidad, como entrada/salida y manejo del sistema de archivos .

Especificación de la API de internacionalización de ECMAScript (ECMA-402)

Defines the JavaScript i18n (Intl) APIs, and is a complement to ECMA-262.[10] Its functionality has been selected from that of internationalization APIs such as those of the International Components for Unicode (ICU) library of the .NET framework, or of the Java platform.

JSON Data Interchange Syntax (ECMA-404)

Defines the JSON (JavaScript Object Notation) syntax, a human-readable open standard file format and data interchange format.[11] It was derived from JavaScript, but is a programming language-independent data format.

Source Map Format Specification (ECMA-426)

Defines the Source map format, used for mapping transpiled source code back to its original sources.[12] The original source map format was created by Joseph Schorr for use by the Closure Inspector minification project, to enable source-level debugging of optimized JavaScript code. In 2024, the source map format was published as an Ecma standard.

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.[13] In December 1995, Sun Microsystems and Netscape announced JavaScript in a press release.[14] In November 1996, Netscape announced a meeting of the Ecma International standards organization to advance the standardization of JavaScript.[15] 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."[16] 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.[17] "ECMA" stood for "European Computer Manufacturers Association" until 1994.

Evolution

Ecma's Technical Committee 39 (TC39) is responsible for the maintenance of ECMAScript.[18] 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.[19] Since the release of version 6 in June 2015, new major versions have been finalized and published every June.[20]

Features

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

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.[22]

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

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.[23]

Transpiling

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.[24] 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 38014 tests as of January 2020.[25] 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.

See also

Notes

  1. In the past, it was also used as a standard for JScript (Internet Explorer), and ActionScript (Adobe Flash).

References

  1. Stefanov, Stoyan (2010). JavaScript Patterns. O'Reilly Media, Inc. p. 5. ISBN 9781449396947. Archived from the original on 2016-06-10. Retrieved 2016-01-12. The core JavaScript programming language [...] is based on the ECMAScript standard, or ES for short.
  2. Wirfs-Brock, Allen; Eich, Brendan (2020-05-02). "JavaScript: The First 20 Years". Proceedings of the ACM on Programming Languages. 4 (HOPL): 1–189. doi:10.1145/3386327. S2CID 219603695.
  3. "JavaScript technologies overview - JavaScript | MDN". MDN Web Docs. 27 October 2025. Retrieved 25 April 2026.
  4. Wunder, C. "Node.js — ECMAScript 2015 (ES6) and beyond". Node.js.
  5. "Deno joins JavaScript standards effort". 14 December 2021.
  6. https://bun.sh/docs#:~:text=or%2C%20more%20formally%2C-,ECMAScript,-)%20is%20just%20a bun
  7. "TC39". Ecma International. Retrieved 25 April 2026.
  8. "TC39 - Specifying JavaScript". tc39.es.
  9. Guo, Shu-yu (2022-02-14). "ECMAScript 2022 Language Specification". tc39.es. Archived from the original on 2020-05-08. Retrieved 2022-02-14.
  10. "ECMAScript 2027 Internationalization API Specification". tc39.es. April 17, 2026. Archived from the original on April 24, 2026. Retrieved April 26, 2026.
  11. "ECMA-404". Ecma International. Retrieved 25 April 2026.
  12. "Source map format specification". tc39.es. March 14, 2026. Archived from the original on April 24, 2026. Retrieved April 26, 2026.
  13. Krill, Paul (2008-06-23). "JavaScript creator ponders past, future". infoworld.com. InfoWorld. Archived from the original on 2014-09-20. Retrieved 2013-10-31.
  14. "Netscape and Sun announce JavaScript, the Open, Cross-platform Object Scripting Language for Enterprise Networks and the Internet". Netscape.com. Netscape. 1995-12-04. Archived from the original on 2002-06-06. Retrieved 2019-11-04.
  15. Press Release (November 15, 1996). "Industry Leaders to Advance Standardization of Netscape's JavaScript at Standards Body Meeting". Netscape.com. Netscape. Archived from the original on 1998-12-03. Retrieved 2013-10-31.
  16. Eich, Brendan (2006-10-03). "Will there be a suggested file suffix for es4?". mozilla.org. Mail.mozilla.org. Archived from the original on 2020-06-21. Retrieved 2021-05-05.
  17. Maffeis, Sergio; Mitchell, John C.; Taly, Ankur (2020-01-03). "An Operational Semantics for JavaScript"(PDF). stanford.edu. Association for Computing Machinery. Archived(PDF) from the original on 2020-01-03. Retrieved 2020-01-03.
  18. "TC39", Technical Committees, Ecma International, retrieved 2024-08-11
  19. "The TC39 Process", TC39, Ecma International, retrieved 2024-08-11
  20. "ECMAScript, TC39, and the History of JavaScript", ui.dev, retrieved 2024-08-11
  21. "About". ECMAScript. Retrieved 2009-12-17.{{cite web}}: CS1 maint: deprecated archival service (link)
  22. Flanagan, David (17 August 2006). JavaScript: The Definitive Guide (5th ed.). O'Reilly. p. 16. ISBN 978-0-596-10199-2.
  23. "JavaScript data types and data structures – JavaScript | MDN". Developer.mozilla.org. 2017-02-16. Archived from the original on 2017-03-14. Retrieved 2017-02-24.
  24. "Lenguaje ECMAScript – test262" . Test262.ecmascript.org. Archivado del original el 14 de mayo de 2011. Consultado el 31 de octubre de 2013 .
  25. "tc39/test262" . GitHub . 24 de enero de 2020. Archivado del original el 1 de octubre de 2019. Consultado el 29 de enero de 2020 .
  26. ES5 es la versión de referencia para este conjunto de pruebas. El índice de conformidad para otras ediciones refleja únicamente la compatibilidad con las nuevas características, no una puntuación global.
  27. "Tabla de compatibilidad de ECMAScript 5" . compat-table.github.io . 14 de abril de 2024. Archivado del original el 14 de enero de 2024. Consultado el 14 de abril de 2024 .
  28. "Tabla de compatibilidad de ECMAScript 6" . compat-table.github.io . 14/04/2024. Archivado del original el 04/04/2024 . Consultado el 14/04/2024 .
  29. "Tabla de compatibilidad de ECMAScript 2016+" . compat-table.github.io . 14/04/2024. Archivado del original el 14/01/2024 . Consultado el 14/04/2024 .
  30. "Tabla de compatibilidad de ECMAScript Next" . compat-table.github.io . 14 de abril de 2024. Archivado del original el 14 de enero de 2024. Consultado el 14 de abril de 2024 .
  31. Puntuación compuesta que incluye las nuevas características desde ES7 hasta los borradores de la próxima edición.