esnext - javascript future

8

Click here to load reader

Upload: zmicier-jarasevic

Post on 10-Jan-2017

77 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: ESNext - Javascript future

ESNext@zmeecer

Page 2: ESNext - Javascript future

VBScript <div>

<% ' Grab current time from Now() function.

' An '=' sign occurring after a context switch (<%) is shorthand ' for a call to the Write() method of the Response object.

Dim timeValue = Now %>

The time, in 24-hour format, is <%=Hour(timeValue)%>:<%=Minute(timeValue)%>:<%=Second(timeValue)%>

</div>

Page 3: ESNext - Javascript future

ECMAScript 1 - Jun 97 First edition

3 - Dec 98 Added regular expressions, better string handling, new control statements, try/catch exception handling

4 - Fight! Abandoned

5 - Dec 09 Strict Mode, JSON, etc

6 - Jun 15 ECMAScript 2015: classes, arrow functions, modules, generators, collections, promises, proxies, string formatting

7 - Jun 16 ES2016: ** and includes

8 - Jun 17 ? SIMD, observable, properties, etc

Page 4: ESNext - Javascript future

ES4 = ActionScriptclass com.example.Greeter extends MovieClip{ public function Greeter() { var txtHello:TextField = this.createTextField("txtHello", 0, 0, 0, 100, 100); txtHello.text = "Hello, world"; }}

Page 5: ESNext - Javascript future

ES6 / ES7http://kangax.github.io/compat-table/es6/

Page 6: ESNext - Javascript future

ES2017● async/await functions● Object.values() / Object.entries()● stringPadding!!!

Draft:

● SIMD● rest/spread properties● global

Page 7: ESNext - Javascript future

Babel / Babilihttps://github.com/babel/babili

class Mangler { constructor(program) { this.program = program; }}new Mangler(); // without this it would just output nothing since Mangler isn't used

// ES2015+ code -> Babel -> Babili/Uglify -> Minified ES5 Code

var a=function a(b){_classCallCheck(this,a),this.program=b};new a;

// ES2015+ code -> Babili -> Minified ES2015+ Code

class a{constructor(b){this.program=b}}new a;

Page 8: ESNext - Javascript future

Resulthttp://stateofjs.com