Throughout the module (and your journey to Google enlightenment while working on IdeaBox2.0) you may notice a few different ways that JavaScript code is being written.
That might have something to do with something called ES6
and ES5
- What is
ES6
? - ES6 is the latest version of ECMAScript, the first update since 2009. ECMAScript is broadly defined as the language embedded in web browsers and to a lesser extent adopted for server and embedded applications. Major enhancements for ES6 compared to ES5 include modules, class declarations, lexical block scoping, iterators and generators, promises for asynchronous programming, destructuring patterns, and proper tails calls. In addition, the ECMAScript library of built-ins has been expanded to support additional data abstractions including maps, sets, and arrays of binary numeric values.
- What is Transpilation and how does it relate to
ES6
? - Transpilation is a process that coverts ES6 to ES5, a language that all browsers currently support. Using transpilers like Traceur and Babel allow you to use all the new feature and tools of ES6 and render it in a way that web browsers will accept.
- Looking at the ES6 Features link below, discuss one update from
ES5
and if it seems useful/superfluous. - Classes: ES6 classes have a single declarative form that makes class patterns easier to use. These classes also support prototype based inheritance, super calls, instance and static methods. This is extremely useful and powerful, especially for someone like me who came from a background in Ruby. While this update doesn't change how the system works, it provides convenience if you prefer that style, which I do.