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 stands for 'ECMAScript 6' and is the 6th and most recent update to the ECMAScript language. ECMAScript is the "proper" name for our good 'ol friend Javascript! This version adds many new features including... string interpolation! YAY! ES6 is not yet supported in all browsers. Chrome and Firefox are leading the way.
- What is Transpilation and how does it relate to
ES6?
Because ES6 is not yet supported in all browsers (and yet many people will want to start using it or already are using it) z conversion needs to take place. This is transpilation - basically the process of converting new ES6 to ES5 so your code is browser compatible no matter where it's being run. There are available tools and libraries to assist with this.
- Looking at the ES6 Features link below, discuss one update from
ES5and if it seems useful/superfluous.
- Classes - as a Rubyist this is cool because it allows JS to look a bit more like Ruby. Classes are a bit easier to read than the whole
prototypething, but I would put this change more in the convenience/superfluous category than anything else (it seems anyway). - String interpolation === FUCK YEAH! This is useful for sure. All the quotes and plus signs in concatenation are a pain and make for headaches/easy mistakes.
- Whoa, if I am understanding arrows correctly they seem to also allow for writing blocks in a much more Ruby-esque manner. Very intriguing!