SlideShare a Scribd company logo
ES6 in Real Life
by @domenic
We do not yet know what we want
and yet we are responsible for what we are
var line = d3.svg.line()
.x(function (d) { return d.x; })
.y(function (d) { return d.y; });
var line = d3.svg.line()
.x(d => d.x)
.y(d => d.y);
this.xScale = d3.scale.linear()…;
this.yScale = d3.scale.linear()…;
this.line = d3.svg.line()
.x(function (d) { return this.xScale(d.time); })
.y(function (d) { return this.yScale(d.price); });
this.xScale = d3.scale.linear()…;
this.yScale = d3.scale.linear()…;
this.line = d3.svg.line()
.x(function (d) { return this.xScale(d.time); }.bind(this))
.y(function (d) { return this.yScale(d.price); }.bind(this));
this.xScale = d3.scale.linear()…;
this.yScale = d3.scale.linear()…;
var that = this;
this.line = d3.svg.line()
.x(function (d) { return that.xScale(d.time); })
.y(function (d) { return that.yScale(d.price); });
this.xScale = d3.scale.linear()…;
this.yScale = d3.scale.linear()…;
this.line = d3.svg.line()
.x(d => this.xScale(d.time))
.y(d => this.yScale(d.price));`
module.exports = Backbone.View.extend({
render: function () {
this.$el.html('Hello, Domenic!');
}
});
module.exports = Backbone.View.extend({
initialize: function (options) {
Backbone.View.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change', this.render);
},
render: function () {
this.$el.html('Hello, ' + this.model.get('name') + '!');
}
});
module.exports = class extends Backbone.View {
constructor(options) {
super(options);
this.listenTo(this.model, 'change', this.render);
}
render() {
this.$el.html(`Hello, ${this.model.get('name')}!`);
}
};
function getSampledData(allData, options) {
var startIndex = options &&
options.startIndex === undefined ?
0 : options.startIndex;
var endIndex = options &&
options.endIndex === undefined ?
allData.length - 1 : options.endIndex;
// Actually use these…
}
function getSampledData(allData, {
startIndex = 0,
endIndex = allData.length - 1 } = {}) {
// Actually use these…
}
git.io/es6features
arrows
classes
enhanced object literals
template strings
destructuring
default + rest + spread
let + const
iterators + for..of
generators
comprehensions
unicode
modules
module loaders
map + set
weakmap + weakset
proxies
symbols
subclassable built-ins
promises
math + number +
string + object APIs
binary and octal literals
reflect api
tail calls
Commitment is an act,
not a word.
Firefox features (enabled!)
for-of/iterables
generators
rest/spread
default params
arrow functions
numeric literals
collections
proxies
number APIs
string APIs
array APIs
v8 flags (in Node 0.11)
--harmony_typeof
--harmony_scoping
--harmony_modules
--harmony_symbols
--harmony_proxies
--harmony_collections
--harmony_observation
--harmony_generators
--harmony_iteration
--harmony_numeric_literals
--harmony_strings
--harmony_arrays
--harmony_maths
v8 flags (on in Chrome 35)
--harmony_promises
--harmony_weak_collections
--harmony_maths
pick and choose
• https://github.com/jlongster/es6-macros/
 destructuring
 classes
 fat arrows
• https://github.com/facebook/regenerator
 generators!
• https://github.com/paulmillr/es6-shim
 string APIs, number APIs, array APIs, object APIs, math APIs
 Map, Set, Promise
• https://github.com/Benvie/WeakMap
 weak maps!
traceur!
https://github.com/google/traceur-compiler
http://es6fiddle.net/
Everything has been figured out,
except how to live.

More Related Content

PDF
ES6 - Next Generation Javascript
PDF
An Intro To ES6
PDF
ECMAScript 6
PDF
Explaining ES6: JavaScript History and What is to Come
PDF
EcmaScript 6 - The future is here
ODP
ES6 PPT FOR 2016
ODP
EcmaScript 6
PDF
Introduction into ES6 JavaScript.
ES6 - Next Generation Javascript
An Intro To ES6
ECMAScript 6
Explaining ES6: JavaScript History and What is to Come
EcmaScript 6 - The future is here
ES6 PPT FOR 2016
EcmaScript 6
Introduction into ES6 JavaScript.

What's hot (20)

PDF
JavaScript - new features in ECMAScript 6
PDF
ES2015 (ES6) Overview
PPTX
Introduction to Ecmascript - ES6
PDF
JavaScript ES6
PDF
Proxies are Awesome!
PPTX
Category theory, Monads, and Duality in the world of (BIG) Data
PDF
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
PPTX
Type Driven Development with TypeScript
PDF
FalsyValues. Dmitry Soshnikov - ECMAScript 6
PPTX
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
PDF
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
PDF
Rust ⇋ JavaScript
PDF
LetSwift RxSwift 시작하기
PDF
Javascript ES6 generators
PDF
Building fast interpreters in Rust
PDF
Planet-HTML5-Game-Engine Javascript Performance Enhancement
PPTX
Academy PRO: ES2015
PDF
Programmation fonctionnelle en JavaScript
PDF
How to Clone Flappy Bird in Swift
PDF
Elm: give it a try
JavaScript - new features in ECMAScript 6
ES2015 (ES6) Overview
Introduction to Ecmascript - ES6
JavaScript ES6
Proxies are Awesome!
Category theory, Monads, and Duality in the world of (BIG) Data
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
Type Driven Development with TypeScript
FalsyValues. Dmitry Soshnikov - ECMAScript 6
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
"Немного о функциональном программирование в JavaScript" Алексей Коваленко
Rust ⇋ JavaScript
LetSwift RxSwift 시작하기
Javascript ES6 generators
Building fast interpreters in Rust
Planet-HTML5-Game-Engine Javascript Performance Enhancement
Academy PRO: ES2015
Programmation fonctionnelle en JavaScript
How to Clone Flappy Bird in Swift
Elm: give it a try
Ad

Viewers also liked (20)

PDF
The New JavaScript: ES6
PDF
ES6: The Awesome Parts
PDF
Lecture 2: ES6 / ES2015 Slide
PPTX
Introducing Razor - A new view engine for ASP.NET
PPTX
Razor and the Art of Templating
PPTX
Views
PPTX
The Promised Land (in Angular)
PPTX
Async Frontiers
PDF
Boom! Promises/A+ Was Born
PPTX
Routing And Navigation
PPTX
Angular 2 NgModule
PPTX
Upgrading from Angular 1.x to Angular 2.x
PPTX
Template syntax in Angular 2.0
PPTX
Component lifecycle hooks in Angular 2.0
PPTX
Angular 2.0 Dependency injection
PPTX
Angular 2 - Ahead of-time Compilation
PPTX
Performance Optimization In Angular 2
PPTX
Angular 1.x vs. Angular 2.x
PPTX
Creating Custom HTML Helpers in ASP.NET MVC
PDF
Rachel's grandmother's recipes
The New JavaScript: ES6
ES6: The Awesome Parts
Lecture 2: ES6 / ES2015 Slide
Introducing Razor - A new view engine for ASP.NET
Razor and the Art of Templating
Views
The Promised Land (in Angular)
Async Frontiers
Boom! Promises/A+ Was Born
Routing And Navigation
Angular 2 NgModule
Upgrading from Angular 1.x to Angular 2.x
Template syntax in Angular 2.0
Component lifecycle hooks in Angular 2.0
Angular 2.0 Dependency injection
Angular 2 - Ahead of-time Compilation
Performance Optimization In Angular 2
Angular 1.x vs. Angular 2.x
Creating Custom HTML Helpers in ASP.NET MVC
Rachel's grandmother's recipes
Ad

Similar to ES6 in Real Life (20)

PPTX
Chapter 7 functions (c)
PPT
Jeop game-final-review
PDF
Java Cheat Sheet
PPSX
What's New In C# 7
PDF
TypeScript Introduction
PDF
Lecture 5: Functional Programming
PPTX
EcmaScript unchained
PDF
Functional programming using underscorejs
PDF
Scala @ TechMeetup Edinburgh
PPT
Wakanday JS201 Best Practices
DOCX
WD programs descriptions.docx
PPT
JBUG 11 - Scala For Java Programmers
PDF
Pragmatic Real-World Scala (short version)
PDF
Pragmatic Real-World Scala
PPTX
ES6 is Nigh
ODP
Scala introduction
PPTX
Advanced JavaScript
PDF
TI1220 Lecture 6: First-class Functions
PPT
SDC - Einführung in Scala
PPT
Scala presentation by Aleksandar Prokopec
Chapter 7 functions (c)
Jeop game-final-review
Java Cheat Sheet
What's New In C# 7
TypeScript Introduction
Lecture 5: Functional Programming
EcmaScript unchained
Functional programming using underscorejs
Scala @ TechMeetup Edinburgh
Wakanday JS201 Best Practices
WD programs descriptions.docx
JBUG 11 - Scala For Java Programmers
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala
ES6 is Nigh
Scala introduction
Advanced JavaScript
TI1220 Lecture 6: First-class Functions
SDC - Einführung in Scala
Scala presentation by Aleksandar Prokopec

More from Domenic Denicola (16)

PPTX
The State of JavaScript (2015)
PPTX
The jsdom
PPTX
The Final Frontier
PPTX
Streams for the Web
PPTX
After Return of the Jedi
PPTX
The State of JavaScript
PPTX
How to Win Friends and Influence Standards Bodies
PPTX
The Extensible Web
PPTX
PPTX
Client-Side Packages
PPTX
Creating Truly RESTful APIs
PPTX
Promises, Promises
PPTX
JavaScript on the Desktop
PPTX
Real World Windows 8 Apps in JavaScript
PDF
Unit Testing for Great Justice
PDF
Understanding the Node.js Platform
The State of JavaScript (2015)
The jsdom
The Final Frontier
Streams for the Web
After Return of the Jedi
The State of JavaScript
How to Win Friends and Influence Standards Bodies
The Extensible Web
Client-Side Packages
Creating Truly RESTful APIs
Promises, Promises
JavaScript on the Desktop
Real World Windows 8 Apps in JavaScript
Unit Testing for Great Justice
Understanding the Node.js Platform

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Cloud computing and distributed systems.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Modernizing your data center with Dell and AMD
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Building Integrated photovoltaic BIPV_UPV.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Cloud computing and distributed systems.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Modernizing your data center with Dell and AMD

ES6 in Real Life