Need to know in Javascript .
- What is ECMAScript 2015/ES6?
- Should I learn ES6 instead of JavaScript?
- Why do we need a different version of JavaScript?
Let’s get some answers!
What is ES2015?
ES2015 (aka ES6) is a version of JavaScript just like ES3 (which you have been used to writing). It introduces new features to the language which we will see in this series. ES2015 is not a new language, it doesn’t bring breaking changes (which means your old JS works), and supports progressive enhancement so you can use what features are available in your browser and mix them with old language features.
Should I learn ES2015 instead of JavaScript?
Now that you know that these two terms are not different from each other, you can learn ES2015 just to enhance your JavaScript skills and keep in touch with cutting-edge technologies.
Being the year 2017, ES2015 has been out for some time now. Browsers are adopting the features more and more. ES2015 is the future of the JS language. Now is an excellent time to learn JavaScript with all that ES2015 has to offer.
Why do we need a different version of JavaScript?
ES2015 is not a different language, it does not introduce breaking changes, and does not require an entirely different environment to run. The new version only tries to make JavaScript better with many improvements.
For example, when declaring variables, var
works as well as let
and const
. let
and const
were introduced in ES2015 to simplify variable management in JavaScript but don't imply that var
is not to be used anymore or doesn't work anymore.
Nothing changed in previous versions of JavaScript. Just fewer nice tools to help make the language easier to work with.