Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do JavaScript versions correlate to ECMAScript versions?

For example, [].map was "implemented in JavaScript 1.6." Is that an ES5 method? How does the 1.6 correlate to an ECMAScript version?

like image 863
ryanve Avatar asked Jul 12 '12 21:07

ryanve


People also ask

How are JavaScript and ECMAScript related?

JavaScript is a general-purpose scripting language that conforms to the ECMAScript specification. The ECMAScript specification is a blueprint for creating a scripting language. JavaScript is an implementation of that blueprint. On the whole, JavaScript implements the ECMAScript specification as described in ECMA-262.

What is ECMAScript and different versions of ECMAScript?

JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997. ECMAScript is the official name of the language. ECMAScript versions have been abbreviated to ES1, ES2, ES3, ES5, and ES6. Since 2016 new versions are named by year (ECMAScript 2016 / 2017 / 2018).

Is ES6 a version of JavaScript?

ECMAScript 2015 was the second major revision to JavaScript. ECMAScript 2015 is also known as ES6 and ECMAScript 6.


1 Answers

There aren't really strict correspondences between the version numbers Mozilla uses and the ECMAScript standard's version numbers. There's a table on Wikipedia that might be what you're looking for -- you'll see that JavaScript 1.6 corresponds to ECMAScript 3 and then some additional extensions. [].map specifically was standardized in ECMAScript 5, but to my understanding, the feature was first introduced by Firefox before the ECMAScript 5 standard was even published. (Firefox 1.5 which included JavaScript 1.6 was released on November 29, 2005, and the standard appears to have been published in September 2009.)

like image 77
Casey Chu Avatar answered Oct 19 '22 16:10

Casey Chu