Learn ES6 from Airbnb's coding standards

I really like Airbnb’s coding standards and as I’ve been trying to master ES6 (also named EcmaScript 2015) I’ve found that they offer many helpful hints on how to use ES6 functionality. Further, its really useful when learning to play around with the syntax and see what the equivalent is in ES5, in order to see what is and is-not possible. One of the best ways of doing that is using babel js’ REPL environment.

So, I’ve created a set of links which open examples from the coding standards in babel, so you can see what the examples compile to and try editing the examples to learn more. I’ve also included links against each section to the MDN or other documentation which explains what is happening in more depth.

If you’d prefer to try out the code in the browser, check out the kangax compatibility table to see which browser you might be able to try something in.

References 2.1 - const Further reading.

References 2.2 - let Further reading.

References 2.3 - let, const

Objects 3.4 - Object literal computed property names. Further reading.

Objects 3.5 - Object literal shorthand method name. Further reading.

Objects 3.6 - Object literal shorthand property name. Further reading.

Objects 3.7 - Object literal shorthand property name.

Arrays 4.3 - Array spread operator. Further reading.

Arrays 4.4 - Array.from Further reading.

Destructuring 5.1 - Object destructuring assignment. Further reading.

Destructuring 5.2 - Array destructuring assignment. Further reading.

Destructuring 5.3 - Object vs Array destructuring assignment.

Strings 6.4 - Template strings. Further reading.

Functions 7.2 - Arrow functions. Further reading.

Functions 7.6 - Rest parameters. Further reading.

Functions 7.7 - Default parameters. Further reading.

Functions 7.8 - Default parameters.

Functions 8.1 - Arrow functions. Further reading.

Functions 8.2 - Arrow functions.

Constructors 9.1 - Classes. Further reading.

Constructors 9.2 - Classes.

Constructors 9.3 - Classes.

Constructors 9.4 - Classes.

Modules 10.1 - Modules. Further reading.

Modules 10.2 - Modules.

Modules 10.3 - Modules.

Iterators and Generators 11.1 - Iterators. Further reading.

Iterators and Generators 11.2 - Generators. Further reading.


Seven Surprising JavaScript 'Features'

Aurelia, less2css and bundling

blog comments powered by Disqus