Which should I learn, ES5 or ES6?

Asked 2 years ago, Updated 2 years ago, 126 views

Hello, I'm starting to learn JavaScript.

I started learning on the online learning site, but the lessons were divided between ES6 and ES5.
If you want to learn from now on, do you only need to learn ES6?
Or should I learn ES5 as well?

If you are familiar with it, please let me know.
Thank you for your cooperation.

javascript es6

2022-09-30 21:45

1 Answers

Hello, nice to meet you.
Basically, it depends on the purpose.

However, when it comes to running on a browser or node.js,
except for tail optimization. There seems to be no problem in 2020, and I think ES6 will be fine to learn.
https://kangax.github.io/compat-table/es6/

However, if you are working, I think you should adjust it to your surroundings.
Code written in older specifications than ES5 will also be encountered on site and on the Internet.
In the future, I think you should be able to understand past sources.

Note: According to your comment, IE11 which supports only ES5 still has 12% share in Japan (3% worldwide).In front-end development sites, coding with ES5 in mind or transpylers such as Bavel will still need to be used in the next few years.


2022-09-30 21:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.