Tag Archives: ES6

Hands on course to learn ES6

With Traceur compiler and React’s JSX, now’s the time to learn ES6

 

Grow your expert full-stack JavaScript skills with tagtree screencast videos and tutorials.

With the advent of ES6, JavaScript has been launched into a proper modern language allowing us to develop elegant code. With a bunch of features that caters for OOP, better scope handling, alleviation of callback hell, and much more, you can’t afford to wait before skilling up and making it part of your projects.

Read more from the source: tagtree.io

Google SoundScript: faster OOP for JavaScript

Chrome is toying with the idea of “use stricter” to allow significant speed improvements

 

Restrictions include no sparse arrays, ES6 class instances are sealed, and a few minor restrictions that have not yet been finalized.

Dr. Axel Rauschmayer summarizes:

Google is currently working on SoundScript, a way to speed up object-oriented programming in JavaScript. The content of this blog post is completely based on a recent talk by Dmitry Lomov. That is, everything I have written here is inferred from those slides and may or may not be correct.

Read more from the source: 2ality.com

Step by step explanations of Promises including diagrams and a peek into implementing a polyfill

If you want a walkthrough on the JavaScript Promises API, look no further

 

ECMAScript 6 promises (2/2): the API

Dr. Axel Rauschmayer from ‚Ď°ality writes

This blog post is an introduction to asynchronous programming via promises in general and the ECMAScript 6 (ES6) promise API in particular. It is second in a series of two posts – part one explains foundations of asynchronous programming (which you may need to learn in order to fully understand this post).

The ECMAScript 6 promise API is easy to polyfill for ECMAScript 5.

Read the article at 2ality.com

Polyfills as a service

Use the latest JavaScript features without worrying about polyfills: include this script tag to automatically polyfill based on browser user agent

 

Essentially, what you want from a polyfill delivery system is a way of sending one single copy of each of the best polyfills, in the right order (respecting dependencies), to just the browsers that lack a native implementation. The polyfill service does this by reading the User-Agent HTTP header and then using it to find the list of polyfills that are suitable for that browser and its specific version. Typically once a browser version is released, its feature set does not change until its next release.

Get started today with this one line:

Read the full article at ft.com

The TC39 group (the panel charged with delivering ES6) has reached consensus on an abbreviated syntax for JavaScript function expressions

Watch for fat arrow syntax in ES6 along with its hard binding of the this keyword

 

Some notable characteristics of fat-arrow functions:

1. No prototype property and can’t be used as constructors

2. The `arguments` object is not available

3. They are always anonymous

4. `this` is hard bound to the parent scope where the function is declared

Some practical examples:

//return a new array containing the squares of the original…

[1, 2, 3, 4, 5].map(x => x * x);

//[1, 4, 9, 16, 25]

//capitalize…

[‘caption’, ‘select’, ‘cite’, ‘article’].map(word => word.toUpperCase());

//[‘CAPTION’, ‘SELECT’, ‘CITE’, ‘ARTICLE’]

Read more from the source: JavaScript, JavaScript…