Top 11 new features of ES6
Here is the list of top 11 ES6 features:
Constants are not changable, if you are coming from other programming languages such as C, C++ and PHP you may be aware of how to use constants. ES 6 support constants using the “const” keyword.
Block level scope
The new ES6 introduced a new feature called block level scope, using this feature a variable or function can have a scope limited to a block.
Arrow functions are short in syntax and this is one of the most used feature in ES6.
ES6 started supporting the default parameters for functions and class methods. So, we can pass the default value as part of the parameters.
This is one of the new coole feature in ES6 which will help to convert Array to primitive data and primitive data into an Array.
Destructuring helps to convert objects and array elememnts into individual variables.
Unlike ES5, ES6 started supporting “class” based object oriented programming like other programming languages such as PHP and Java.
Generators are special types of function, can be paused and resumed.
The new Map object can be used to store and retrieve key value pairs.
The new Promise object is very useful to make asynchronous calls.
Template literals allows developers to use embedded variables and expressions inside.