A presentation given at General Assembly in Austin, TX on the next generation of JavaScript, ES2015. This is a part of IBM Design's FEDucation on the Street program.
5. .FED@IBM
Hills
Allow Offering Management, Engineering, and
Design to collaborate effectively
Describe product development work that we
can take on for the next release
Allows global teams to always stay in alignment
6. A Front-End Developer can begin using
ES2015 in their projects immediately after
seeing this talk.
.FED@IBM
General Assembly Hill
7. A Front-End Developer can begin using
ES2015 in their projects immediately after
seeing this talk.
.FED@IBM
Who
8. A Front-End Developer can begin using
ES2015 in their projects immediately after
seeing this talk.
.FED@IBM
What
9. A Front-End Developer can begin using
ES2015 in their projects immediately after
seeing this talk.
.FED@IBM
Wow
10. Overview
Who
What is an ECMAScript, where did it come from? What does
ES6 or ES2015 mean?
What
What does it mean to use ES2015 in my projects?
Wow
How can I begin applying new features available from ES2015
in my projects today?
36. .FED@IBM
Template Literals
const a = 'Hello';
const b = 'World';
const msg = `${a} ${b}!`; // Hello World!
// ES5
var a = 'Hello';
var b = 'World';
var msg = a + ' ' + b + '!'; // Hello World!
48. .FED@IBM
Shorthand Property
var name = 'Josh';
var age = 22;
var person = { name: name, age: age };
const name = 'Josh';
const age = 22;
const person = { name, age };
82. .FED@IBM
Array
// Returns a real Array
Array.from(document.querySelectorAll("*"))
// Similar to new Array(...), but without
// special one-arg behavior
Array.of(1, 2, 3)
[0, 0, 0].fill(7) // [7,7,7]
[1, 2, 3].findIndex((x) => x === 2) // 1
89. Classes
function Person(name) {
this.name = name;
}
Person.prototype.sayName = function sayName() {
return `My name is ${this.name}!`;
}
const Iheanyi = new Person('Iheanyi');
console.log(Iheanyi.sayName()); // My name is Iheanyi!
.FED@IBM
90. Classes
class Person {
constructor(name) {
this.name = name;
}
sayName() {
return `My name is ${this.name}!`;
}
}
const Iheanyi = new Person('Iheanyi');
console.log(Iheanyi.sayName()); // My name is Iheanyi!
.FED@IBM
105. What happens when all the
ES6 features are implemented?
Won’t Babel be obsolete then?
“
.FED@IBM
106. Babel is more than just
an ES2015 compiler.
.FED@IBM
107. Lifespan Bleeding Edge
Goal is to always support the latest and greatest features
before they are in any native runtime.
Browser Support
Having to support older browsers will most likely remain a
necessity as more and more people access the web through
their mobile phones.
Optimizations
Babel plugins allow you to make assertions about your code,
allowing it to make optimizations to make your production
code that much faster.
108. Recap ECMAScript
This history of ECMAScript, the different versions of the
language
ES2015
What is ES2015, and what features does it offer to you as a
developer.
Babel
How can we start incorporating these new features into our
projects today.
109. Next Steps ES2015 Overview in 350 Bullet Points
This article aims to summarize most syntax changes and
features coming in ES2015.
Learn ES2015
A detailed overview of ECMAScript 2015 features.
Configuring Babel 6
Babel 6 is much more configurable than Babel 5, but also
more difficult to configure. This blog post gives tips.
https://github.com/bevacqua/es6
https://babeljs.io/docs/learn-‐es2015/
http://www.2ality.com/2015/11/configuring-‐babel6.html