Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.94 KB

1-what-is-ES6.md

File metadata and controls

62 lines (40 loc) · 2.94 KB

1- What is ES6?:

alt text

A litte bit of History:

History Year
ECMAScript 1: 1997
ECMAScript 2: 1998
ECMAScript 3: 1999
ECMAScript 4: Abandoned
ECMAScript 5: 2009
ECMAScript 5.1: 2011
ECMAScript 6: 2015
ECMAScript 7: Work in progress

"ES6 will change the way you write JS code."

To tell you the true, when I read this quote it’s scared me a little bit, thinking old code old knowledge could go to the bin. Reality check: **ES6 is an enhancement of ES5.** ES6 brings new features, solve few problems and it can be partially or complete incorporated to our code and make things easy to understand.

ES6 Goal: To be a better language

Why we want to learn ES6?

We are developers, we are progressive. We want to learn the latest things so we can build the best applications possible. We will be ready, our product will be future proof and as a developer we will be more marketable as a coder in the industry.

A large number of the top libraries that are building these days are all going to be written in ES6 in the near future, ES6 will positioning an step ahead and we will be ready for AngularJS 2, Ember 2, etc.

AngularJS AngularJS and ES6 link

EmberJS EmberJS and ES6 link

ReactJS ReactJS and ES6 link

AngularJS 2:

AngularJS2 it’s going to be a big deal. If you worry to get ready to AngularJS2, about being ready from a knowledge standpoint there are some new things that you should know about.

What can we do right now in order to be up to date when AngularJS 2 comes?

If you want to be ready for AJS2 we can start learning ES6, and we’ll be ahead of the game. We can be ready and prepared focusing on one thing in particular: ES6

ES6 and TypeScript:

**Angular2 is written in TypeScript. TypeScript is superset of ES6, which is superset of ES5. **

alt text

Can I use ES6 on AngularJS2?

Angular2 production build is being transpiled to ES5 in order to be executable by the modern browsers. You also can choose whether you want to write your code in ES5, ES6, TypeScript (of course if you choose ES6, TypeScript your code should go through a process of compilation in order to be transpiled).

Do I need to migrate my javaScript code to ES6?

**There is no need**: ECMAScript 6 is a superset of ECMAScript 5. Therefore, all of your ES5 code is automatically ES6 code. How exactly ES6 stays completely backwards compatible