ECMA (European Computer Manufacturers Association) aims to develop standards and technical reports to facilitate and standardize the use of information communication technology. ECMA Provides standard for, C# , C++/CLI , Dart, JavaScript etc.
ECMAScript 6 is the newest version of the ECMAScript standard. This standard was ratified in June 2015. ES2015 is a significant update to the language, and the first major update to the language since ES5 was standardized in 2009.
It has a lot new features like Scoping, Arrow Functions, Unicode String, Modules, Classes, New builtin methods & lot more. We will be focusing on how JavaScript is enhanced with the advent of ES2015.
2. Ecmascript Release Date Changes
1 June 1997 First edition
2 June 1998 Editorial changes for fully aligned specification
3 Dec 1999 Regular Expression, error, string handlers, formatting
of input and output enhanced.
4 Abondoned It was dropped because differences on javascript
complexity
5 Dec 2009 “strict mode” added, error checking improved, gettters
and setters, support for JSON, improved introspection
of Objects
5.1 June 2011 Editorial changes for fully aligned specs ECMA-262
6 June 2015 New syntax, classes, modules added, python style
generator, for/of loop, promises, collections,
37. Feature Shim/Polyfill Transpiler
Arrows and Lexical This Yes
Classes Yes
Enhanced Object Literals Yes
Template Strings Yes
Destructuring Yes
Default, Rest, Spread
Parameter
Yes
Let & Const Yes
Iterators + For..Of Full Support
Generator Full Support
Unicode Yes
Modules Transpiles to Common.js,
AMD, System, and UMD
Map + Set + WeakMap +
WeakSet
Full Support
Proxies Unsupported Unsupported
Symbols Limited Support
Promises Full Support
38. ECMASCRIPT 262 [http://www.ecma-international.org/ecma-262/6.0/index.html]
ES6 Shim [https://github.com/paulmillr/es6-shim/]
Support Detail of ES6 [https://babeljs.io/docs/learn-es2015/]
Editor's Notes
As we noticed in last slide ES5 was finalized in 2011 yet we are adopting its features and trying to use it since a couple of years back, but what did we wait for,
We waited for browsers to support ES5 API.
What if you want to use some of the features of ES2015 it will supply your browser the code that needs to support that featureWhat would be the output of 0===-0 // true
What would be the output of NaN === NaN // false
You CAN'T exit the limits of the destination language. You could, however, create a compatibility layer that emulates the missing features and provide the functionality somehow.
In your example, if the foo internal function writefile() is the one that writes files, you could make a library that provides a writefile function that uses ajax to store the files to the server (or a cookie or localstore, etc). The original foo script wouldn't have to be changed for it to work.
And this is precisely one of the main parts about writing a transpiler: You not only have to translate the language, but you also have to emulate the missing features.
(you can also opt to disable the missing features)
JavaScript is being introduced by full proof Classes inheritances features.