ES6 - Make JavaScript Great for the First Time
-
Upload
leo-hernandez -
Category
Technology
-
view
218 -
download
0
Transcript of ES6 - Make JavaScript Great for the First Time
About me
Software developer (JavaScript, React, Ember, .Net, Java)
I work at NinjaMSP
Been a member and speaker at BocaJS since 2014
Follow me on Twitter: @leojh
@leojh
What is ES6 / ES2015
Latest JavaScript spec
Finalized in 2015
Introduces many modern language features to JavaScript
Browser support is still limited
@leojh
ES6+ features
String templates/interpolation
const / let
Fat arrow functions
Destructuring
Modules
Spread Operator
Generators
Default parameters
Classes
Promises
Annotations
Observables
async / await
and more! …@leojh
const / let
● Stop using var● Not function scoped like var● Block scoped● ALWAYS USE const● Use let if you need to mutate your variable
@leojh
Common High Order Functions
● Stop using loops (for, while, do while) ● Favor use of
.forEach() - do something on each item
.map() - transform each item
.filter() - return all that match
.some() - true/false if any match
.reduce() - compute over set of items@leojh