官术网_书友最值得收藏!

Chapter 7. ECMAScript 6

So far, we have taken a detailed tour of the JavaScript programming language. I am sure that you must have gained significant insight into the core of the language. What we saw so far was as per the ECMAScript 5 (ES5) standards. ECMAScript 6 (ES6) or ECMAScript 2015 (ES2015) is the latest version of the ECMAScript standard. This standard is evolving and the last round of modifications was done in June, 2015. ES2015 is significant in its scope and the recommendations of ES2015 are being implemented in most JavaScript engines. This is great news. ES6 introduces a huge number of features that add syntactic forms and helpers that enrich the language significantly. The pace at which ECMAScript standards keep evolving makes it a bit difficult for browsers and JavaScript engines to support new features. It is also a practical reality that most programmers have to write code that can be supported by older browsers. The notorious Internet Explorer 6 was once the most widely used browser in the world. To make sure that your code is compatible with the most number of browsers is a daunting task. So, while you want to jump to the next set of awesome ES6 features, you will have to consider the fact that several ES6 features may not be supported by the most popular of browsers or JavaScript frameworks.

This may look like a dire scenario, but things are not that dark. Node.js uses the latest version of the V8 engine that supports majority of ES6 features. Facebook's React also supports them. Mozilla Firefox and Google Chrome are two of the most used browsers today and they support a majority of ES6 features.

To avoid such pitfalls and unpredictability, certain solutions have been proposed. The most useful among these are polyfills/shims and transpilers.

主站蜘蛛池模板: 平阴县| 凌云县| 开封市| 黔东| 赫章县| 淮滨县| 壤塘县| 慈溪市| 淮北市| 卢湾区| 双辽市| 汤原县| 石楼县| 梨树县| 洛扎县| 黔江区| 新野县| 西城区| 玛曲县| 辉县市| 元江| 禄丰县| 杨浦区| 眉山市| 昔阳县| 宾川县| 二连浩特市| 稷山县| 修文县| 延津县| 商城县| 衡南县| 隆子县| 姜堰市| 鲁山县| 夏河县| 错那县| 平武县| 神农架林区| 岢岚县| 广西|