Questions about Ecmascript

Asked

Viewed 71 times

1

I searched several contents on the internet, but I did not have a very clear answer, and I would like to know why the courses teach from ES6 and not ES5, ES4 etc...

There is something specific about ES6 that makes it be studied precisely in this version?

I know there are other later versions like ES7, ES8, ES9... but why don’t we just start studying these current versions instead of ES6?

  • Is studied SE6 because it is the version supported by all browsers and JS environments. The ES7 is only partially supported by Chrome and Opera.

  • 5

    @Augustovasques beware of the statement "all browsers" that this is not quite true, and it depends on the version, see here: https://caniuse.com/#search=es6

  • 1

    @Ricardopunctual correct, it was presumptuous of me.

2 answers

6


It doesn’t make much sense to start learning with outdated solutions. It would be the same as learning engineering with the knowledge that there were 50 years ago. A very clear case is that of var. Take a modern course to teach how to use var and not let/const doesn’t make much sense. It seems wrong to me. The same applies to callbacks, Promises and async/await. Leaving out these fundamental pieces of modern Javascript would be a major flaw in the course.

There are still other novelties that have made old methods like .classList and dataset, ... among others.

I think it makes sense for a course to have progressive complexity, start with simple situations and increase complexity. But in relation to language it would be misleading to "hide" the progress that took so long to arrive.

I would say that what was included in the language should be part of the course. At the same time it should refer to the speed of implementation in browsers (as Ricardo Pontual said) and also refer to future improvements in the final stage of process of Ecmascript.

  • Sergio, I think your answer answers why you don’t use ES5, ES4 etc., but why you use ES6 and not ES7, ES8 etc.

  • 2

    @Rafaeltavares Pq ES7, ES8, etc... still does not have full support from browsers, by the way, nor does ES6 have it.

-1

Objectives of ES6:

TC39 focused on some goals in the development of SE6: Be a better language to build complex applications Solve old Javascript problems Ease in the development of Ibraries These goals will become clearer when we look at the ES6 Features in practice.

News from ES6:

Now that we know what ES6 is and how we can use it today with Babel, we can then see the Features it will add in the language and its benefits.

And as Sergio already said it makes no sense to learn something outdated.

And adding that @Leandrade commented other later versions might not have support for all browsers

  • If ES6 is the newest version of Javascript, what are ES7, ES8, ES9... as mentioned in the question?

  • Corrected, thank you very much for the constructive criticism, had not noticed :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.