Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ecmascript 2015
Search
Benjamin
July 03, 2015
Programming
60
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ecmascript 2015
Benjamin
July 03, 2015
More Decks by Benjamin
See All by Benjamin
Intégrer Cordova dans une appli native
benjmichel
0
92
Other Decks in Programming
See All in Programming
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
200
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
250
setup-vp GitLab対応の裏側
naokihaba
0
140
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.8k
JRuby: Past, Present, and Future
headius
0
220
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
520
SREの越境 / SRE Collaboration
y0hgi
2
290
Agents on Rails - Rails at Scale 2026
irinanazarova
0
310
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
110
Are APIs Still Relevant in the AI Era?
soyuka
0
390
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
350
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
The World Runs on Bad Software
bkeepers
PRO
72
12k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Invisible Side of Design
smashingmag
301
52k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Transcript
ECMAScript 2015 Benjamin MICHEL 03/07/2015
What is ECMASript ? • a scripting language • standardized
by Ecma International • several well-known implementations: ◦ JavaScript ◦ JScript ◦ ActionScript
History of ES • First edition 1997 • ES 3
in 1999 • ES 4 never released : too ambitious • ES 5 in 2009 • ES 6/2015 also called Harmony • ES 7/2016
ES2015 features
Promises var promise = new Promise(function(resolve, reject) { // some
code }); promise.then(successCb, errorCb); promise.catch(errorCb); Promise.all([promise1, promise2]);
Class class MyClass extends MyParentClass { constructor (param1, param2) {
super(param1, param2); // some code } myMethod1(param) { // some code } static myMethod2(param) { // some code } }
Generator function* testYield(){ var index = 0; while(index < 3){
yield index++; } } var gen = testYield(); console.log(gen.next().value); // 0 console.log(gen.next().value); // 1 console.log(gen.next().value); // 2 console.log(gen.next().value); // undefined
Let - Const function varTest() { var x = 31;
if (true) { var x = 71; console.log(x); // 71 } console.log(x); // 71 } function letTest() { let x = 31; if (true) { let x = 71; console.log(x); // 71 } console.log(x); // 31 } const myConstant = 42; myConstant = 12; // Error const myConstant = 3; // Error
Arrow ([param] [, param]) => { instructions } param =>
expression // implicit return var square = (x) => x*x;
Arrow - Bind this lexically ES5: var myObject = {
var myString = ‘Hello’; var myArray = [‘a’, ‘b’, ‘c’]; var myMethod = function () { var self = this; this.myArray.forEach(function(element){ console.log(self.myString + element); }) } } ES2015: var myObject = { var myString = ‘Hello’; var myArray = [‘a’, ‘b’, ‘c’]; var myMethod = function () { this.myArray.forEach((element) => console.log(this.myString + element); }) } }
Destructuring var anArray = [1,2,3]; var [one, two, three] =
anArray; var [foo, [[bar], baz]] = [1, [[2], 3]]; var anObject = {prop1: ‘abc’}; var {prop1: myProp1} = anObject;
String template console.log(`first line second line`); var a = 2;
var b = 3; console.log(`the sum of a and b is ${a+b}`);
For .. of var myArray = [‘a’, ‘b’, ’c’]; for(
let myElement of myArray) { console.log(myElement); }
Modules // lib.js export square = (x) => x*x; //
main.js import {square} from lib; console.log(square(4)); NB: a lot of variation of ‘import’ syntax exist to please both AMD and Common.js users
Map set let mySet = new Set([1,2,2,2,2,2,2]); mySet.add(3); console.log(mySet.size); //
3 console.log(mySet.has(2); // true mySet.delete(2); console.log(mySet.has(2); // false
Current support
ES 2015
ES 2016
Links • http://kangax.github.io/compat-table/es6/ • http://es6katas.org/ • https://babeljs.io/docs/learn-es2015/