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
? - What is Transpilation and how does it relate to
ES6
? - Looking at the ES6 Features link below, discuss one update from
ES5
and if it seems useful/superfluous,
ES6 / ES2015 is the newest version of JS. I implemented ES6 into my ideabox. From my expeirence, ES6 brings forth lots of syntactic sugar including classes, new prototype methods, string interpolation and more. When I implemented it, I had to use Babel to convert my es6 into es5 for rails and all browsers to use it. This seems like the safe way to implement ES6 at this date as not all browsers are using it. However, you do lose some of the performance enhancing features such as consts.
I loved using string interpolation in my project with ES6. It cleaned up a lot of concatenation and created more readable, easier to maintain code.