Skip to content

Instantly share code, notes, and snippets.

@ryanflach
Forked from anonymous/es6-research.markdown
Last active October 6, 2016 20:40
Show Gist options
  • Save ryanflach/ced3cf8e4b78e75ba54e7e0c692ad1a8 to your computer and use it in GitHub Desktop.
Save ryanflach/ced3cf8e4b78e75ba54e7e0c692ad1a8 to your computer and use it in GitHub Desktop.
  1. What is ES6?
  • Officially ECMAScript 6, it is the most recent build of syntax for JavaScript (ECMAScript is the 'proper' name for JavaScript).
  1. What is Transpilation and how does it relate to ES6?
  • A source-to-source compiler. With regard to ES6, a tool like Babel would allow you to write in ES6 and have the code compiled to ES5, for environments where ES6 might not yet be supported.
  1. Looking at the ES6 features link below, discuss one update from ES5 and if it seems useful/superfluous.
  • I had seen the new 'arrow' syntax but didn't have an understanding of it. In short, it is shorthand for function and is of particular use when a single-line function is being called. From the examples found here:
var bar = foo.map(function(x) { return x.length; });

becomes:

let bar = foo.map(x => x.length);

In addition to the function call no longer being spelled out explicitly with function, return is implicit.

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