ES2015

ES2015 or ES6 as it is often called, is a major update to the JavaScript language, that added a number of new features, behaviors, and extensions that make our lives as developers easier.

Support across browsers, has until recently been quite limited but now most browsers (except IE) support the majority of features. Backwards compatibility can be achieved through the use of Babel a tool for transpiling (converting code from one programming language to the equivalent code in another) from ES6 to ES5.

We'll be learning Node.js in this course, which has support for ES6 Features, so let's begin exploring them now...

Dilbert Comment
Figure: Dilbert Comment

There's a problem however! We don't have a section in the Gitbook for all these cool features yet. So as upcoming developers, we're giving you the chance to tackle an important part of the job - writing technical documentation.

Lab Time

We've picked out the following super cool features of ES6. The class will be divided into groups and each will be responsible for researching one of the features. After group discussions, ensure you have an agreed understanding and you'll then have to write a Markdown file called e6s-[feature-name].md that explains the following:

  • What is the feature
  • How do we use it?
  • What problem does it solve?
  • Show an example ES5 code vs ES6 code
  • Is this the 80% or the 20% i.e. how useful is this feature to us really

Each team will then get an opportunity to teach this new feature to the class. Do not just copy and paste from MDN, the challenge here is to find a way to make this feature effortlessly easy to understand. Code Examples, Analogies and the avoidance of Jargon help.

Note: It is assumed that you will write this in beautiful markdown much like this Gitbook, so as part of this you'll have to learn Markdown too. Here's a Markdown cheatsheet that may help.

ES6 Features

  • Function extensions (Default, rest, spread, fat arrow)
  • Enhanced Object Literals
  • Template strings
  • New Math, Number, String, Array & Object APIs
  • Destructuring
  • Block Level Scope (Const & Let)
  • Classes (Extends & Super)
  • Babel (ok, not a feature but good to know)

results matching ""

    No results matching ""