ECMAScript
dynamic | |
---|---|
Website | www |
Major implementations | |
JavaScript, ActionScript, JScript, QtScript, InScript, Google Apps Script | |
Influenced by | |
Self, HyperTalk, AWK, C, CoffeeScript, Perl, Python, Java, Scheme |
![]() | |
Filename extensions |
.es |
---|---|
Internet media type |
application/ecmascript |
Developed by | Sun Microsystems, Ecma International |
Initial release | June 1997 |
Latest release | Edition 14 June 2023 |
Type of format | Scripting language |
Website | ECMA-262, ECMA-290, ECMA-327, ECMA-357, ECMA-402 |
ECMAScript (/ˈɛkməskrɪpt/; ES)[1] is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is also best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers.[2] It is standardized by Ecma International in the document ECMA-262.
ECMAScript is commonly used for
ECMAScript, ECMA-262, JavaScript
ECMA-262, or the ECMAScript Language Specification, defines the ECMAScript Language, or just ECMAScript.[3] ECMA-262 specifies only language syntax and the semantics of the core application programming interface (API), such as Array, Function, and globalThis, 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
Version history
Features
![]() | This section needs expansion. You can help by adding to it. (February 2017) |
The ECMAScript language includes structured, dynamic, functional, and prototype-based features.[9]
Imperative and structured
ECMAScript JavaScript supports
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
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.[13]
Transpiling
Since ES 2015, transpiling JavaScript has become very common. Transpilation is a
Conformance
In 2010, Ecma International started developing a standards test for Ecma 262 ECMAScript.[14] 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 testsuite) and Microsoft who both contributed thousands of tests. The Test262 testsuite consisted of 38014 tests as of January 2020[update].[15] 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.
Scripting engine | Reference application(s) | Conformance[16] | |||
---|---|---|---|---|---|
ES5[17] | ES6 (2015)[18] | ES7 (2016)[19] | Newer (2017+)[19][20] | ||
SpiderMonkey | Firefox 94 | 100% | 98% | 100% | 100% |
V8 | Google Chrome 95, Microsoft Edge 95, Opera 80 | 100% | 98% | 100% | 100% |
JavaScriptCore
|
Safari 15 | 100% | 99% | 100% | 90% |
See also
References
- ISBN 9781449396947. Archivedfrom 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.
- S2CID 219603695.)
{{cite journal}}
: CS1 maint: date and year (link - ^ Guo, Shu-yu (2022-02-14). "ECMAScriptÂŽ 2022 Language Specification". tc39.es. Tc39.es. Archived from the original on 2020-05-08. Retrieved 2022-02-14.
- ^ 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.
- ^ "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.
- ^ 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.
- ^ 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.
- ^ 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.
- ^ "About". ECMAScript. Archived from the original on 2012-08-02. Retrieved 2009-12-17.
- ISBN 978-0-596-55447-7. Archivedfrom the original on 1 August 2020. Retrieved 11 November 2019.
- ^ Bernhardt, Gary. Wat. CodeMash 2012. Destroy All Software. Archived from the original on 2019-10-28. Retrieved 2021-08-18.
- ^ Gilbertson, Scott (26 January 2012). "Jokes for Nerds: Wat Moments in Programming". Wired. Archived from the original on 23 August 2020. Retrieved 22 August 2021.
- ^ "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.
- ^ "ECMAScript Language – test262". Test262.ecmascript.org. Archived from the original on 2011-05-14. Retrieved 2013-10-31.
- ^ "tc39/test262". GitHub. January 24, 2020. Archived from the original on October 1, 2019. Retrieved January 29, 2020.
- ^ ES5 is the baseline for this test suite. The conformance rate for other editions reflects support for new features only, not a comprehensive score.
- ^ "ECMAScript 5 compatibility table". kangax.github.io. Archived from the original on 2018-11-19. Retrieved 2018-11-08.
- ^ "ECMAScript 6 compatibility table". kangax.github.io. Archived from the original on 2018-11-17. Retrieved 2018-11-08.
- ^ a b "ECMAScript 2016+ compatibility table". kangax.github.io. Archived from the original on 2018-11-24. Retrieved 2018-11-08.
- ^ Composite score that includes new features from ES7 through next edition drafts