Skip to content

Instantly share code, notes, and snippets.

@ShannonPaige
Forked from rrgayhart/es6.markdown
Last active March 27, 2016 16:39
Show Gist options
  • Save ShannonPaige/6adec346ebcb81b98845 to your computer and use it in GitHub Desktop.
Save ShannonPaige/6adec346ebcb81b98845 to your computer and use it in GitHub Desktop.
es6 - 1510

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

Fork this gist and answer the following questions:

  • What is ES6?

It's the latest version of JavaScript, i.e JavaScript 2015. The ES stands for ECMAScript. In 1996 Microsoft broke javascript by adding their own methods and classes and calling it JScript, so Netscape was like "whoa dude, that's out thing" and went to tell on them to ECMA, which is a group that standardizes information an communication systems (everything from CD-ROMs to JSON). ECMA came up with ECMAScript as the standard version everyone should use, and they make updates to it occasionally. ECMA6 was approved/published in June 2015. It adds a ton of new features including classes, arrow methods, math libraries and template strings (that makes Steve very happy).

  • What is Transpilation and how does it relate to ES6?

Transpilation is like compilations, but instead of transforming one language to another, you transform it from one language to another similar language with the same level of abstraction - like scss to css. Everyone was going crazy over ES6, and wanted to use it before it was approved/publsihed by ECMA. A transpiler was the solution. By using Babel, or a similar transpiler, a developer can write ES6 and Babel will transpile it into ES5 for them. That gives developers the time to learn the new features before they have to make the switch.

  • Looking at the ES6 Features link below, discuss one update from ES5 and if it seems useful/superfluous,

Easy answer, but template strings is such a game changer. Putting html in my js has always seemed weird to me because of all the concatinations - it just felt wrong. But with template strings, you can write it the way you would in your views, so much easier. arrows also seem cool, although I hope I don't get them confused with key/value definitions.

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment