Microsoft Edge and ECMAScript 6

April 5, 2022 0 Comments

As a web developer, ES6 looks promising and exciting for me. Things that were very necessary now have a place in the JavaScript specification. Here are some promising ES6 features:

Constant

Allows you to define variables whose values ​​are constant and cannot be changed

Block scoped variables and functions

Variable / function scope will now be in the block where they are defined.

Arrow function

Similar to the long expression in C #. A more expressive closed syntax

Template strings

String interpolation in JavaScript for single line and multi line strings.

Module

Ability to modulate your code through different modules.

Class

The intuitive OOP style class now comes in JavaScript.
The full specification of eS6 can be read here.

ES6 support at Microsoft Edge:

ES6 is definitely one of the biggest updates to JavaScript to ever happen At the moment, as of the writing of this article, Edge supports most of the features of 2015 and scores high in the ES6 compatibility table.

EDGE score on ES6 compact chart

Ready to use features are arrow function, extended object literal, template string, remaining parameters, let & const support, proxy, symbol, repeater, typed array, map, set, weak map, weak set, string, array, number, New methods & math.

Experimental ES6 Features in Microsoft Edge:

Specific features as mentioned above are already available out of the box and are turned on by default. However there are some features that have been created but can be turned on as an experimental feature and by accessing MS AJ flags. Open the flag mode by typing “about: flags” in the address bar. Enable the checkbox titled “Enable experimental JavaScript features”.

JavaScript Experimental Flag at Edge

ES6 Roadmap for Microsoft Edge:

Microsoft Edge has scored high on the ES6 Competitive Chart above and the score will increase over time. Microsoft has an official status site where one can find out what is supported outside the Edge box and what is planned as a roadmap. You can access the site here. The Technical Committee or TC, as they are called, has started a cadence or release cycle in annual mode for ES specification. This means that TC will now meet and publish the annual specification, and it will match Edge’s release cadence.

Using ES6 in production:

While the ES6 is great, it’s still a long way off when all browser vendors, including Microsoft, are ready with 100% support. Currently you can’t go mainstream with ES6 because not all browsers fully support ES6. Thanks to Transpilers – a JavaScript transformation compiler – you can code in ES6 and Transpilers generate ES5 code for you. Note that the JavaScript we write today complies with ES5 standards. So the transpilers spit out the ES5 code from your ES6 code which is the version needed to run in the browser. Once ES6 is mainstream, you can then move your build’s translation step and use the ES6 code directly in browsers. Some popular transpiler tools are TypeScript, Babel and Traceur.

We are all excited about the way the modern web is taking shape. So get a free evaluation of your website and rush to see you on the other side.

Click here to see if your website meets the interoperable web standards and is ready for a variety of modern browsers, including Microsoft Edge.

Leave a Reply

Your email address will not be published.