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

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.

主站蜘蛛池模板: 鹤山市| 柘城县| 新乐市| 石棉县| 汉中市| 耒阳市| 革吉县| 湾仔区| 崇礼县| 通辽市| 安吉县| 咸宁市| 崇州市| 楚雄市| 沙雅县| 积石山| 富川| 宽城| 兴仁县| 通河县| 项城市| 鄂伦春自治旗| 桃江县| 安庆市| 大悟县| 昔阳县| 广西| 武宣县| 青浦区| 旅游| 望谟县| 龙游县| 贵港市| 彩票| 卓尼县| 秭归县| 临泽县| 桦南县| 湛江市| 万州区| 普洱|