Here a list of some features that came with ES6. If you are looking for the full specification of ECMAScript 6 please visit from here.
That sure is a long list. So, today let's talk about some of the top features from this list.
Before ES6 there was only one way to declare variables in JS and that was with the
var keyword. ES6 introduced
const and let works almost the same way. But with
const you can declare constants(Read-only), so the variables declared as constants will be read-only. But this does not affect object properties or array elements.
When you declare a variable outside any function it's global scoped. It can be accessed from anywhere in the program. When a variable is declared inside a function it's said to be function scoped (ex: let and const).
A complete guide for beginners to learn the essential topics of ES6 which are required to learn React JS - Udemy Free Course
Every function created with the function keyword or with the method shorthand has its own “this”, and it generally binds to “who” called it. Arrow functions don’t bind “this” to anything, the “this” inside depends on the surrounding context