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

  • JavaScript:Moving to ES2015
  • Ved Antani Simon Timms Narayan Prusty
  • 305字
  • 2021-07-09 19:07:40

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.

主站蜘蛛池模板: 抚远县| 荔浦县| 乐清市| 上饶县| 墨竹工卡县| 东乡族自治县| 定襄县| 樟树市| 朝阳区| 肥西县| 山阴县| 凯里市| 上高县| 通州区| 宁陵县| 长春市| 饶平县| 克什克腾旗| 沙河市| 蓝山县| 安塞县| 瓦房店市| 阳山县| 锡林浩特市| 广东省| 宜兴市| 长子县| 红桥区| 夹江县| 武冈市| 即墨市| 天等县| 绵阳市| 六安市| 永善县| 溧阳市| 武义县| 都兰县| 明星| 南雄市| 西盟|