ES6 - Aug + Sep + Oct 2017

— 2 minute read

What? permalink

ES6 aka ES2015. A newer version of JS (it's not the most recent one). ES2017 came out in June 2017.

Why? permalink

I am still writing in Vanilla JS and more and more js posts are in ES2015 around the web. It's time to understand all the PROs and CONS of the new syntax and take advantage of it.

As you've noticed that I've spent 4 months on this topic and most of it was not by design:

  • August was filled with adventures with the kiddos.
  • Changes to my morning routine with kids going back to school.
  • Time needed to evaluate Typescript as a possible replacement to ES6 (more on that below).
  • Increased workload which led to evening work reducing my personal study time.

How permalink

Takeaways permalink

  1. Installing, configuring, and using (Webpack||Gulp+Browserify) + Babel for ES6 transpiling.
  2. New variable instantiation (let vs const).
  3. Template literals.
  4. The changes in the use of "this" for fat arrows and changes in scoping for functions and blocks.
  5. Classes along with their constructor function and how that fits with NG1 $onInit function.
  6. Module instantiation, import, and export while working with ES5 and ES2015.
  7. Object and Array destructuring.
  8. Rest and Spread operators.
  9. Generators and Iterators.

I wrote examples for most of these as I worked through them in this Github repo.

Worthy Resources For Next Time permalink