DEV Community

The long path of JavaScript - from ES6 until today.

Farid Shabanov on May 25, 2024

According to a Stack Overflow survey, JavaScript was the most popular language among developers in 2023. JavaScript was initially developed for Net...
Collapse
 
oculus42 profile image
Samuel Rouse

This is a great article talking about the updates and changes of JavaScript!

ES6, which was released in 2015 and was the second major and the biggest release for the language

This is my one quibble: ES6 was the fourth major release. Undoubtedly the largest release, though. I would consider both the third and fifth versions to be major releases in their own right.

ES3 introduced function expressions, object literals, and try/catch. It doesn't get a lot of fanfare, but it permitted the creation of JSON and made JavaScript robust enough to build complete applications like Outlook Web Access and Gmail.

ES5 added getters and setters. This enabled a large number of advancements, including the chaining style like Chai's expect(value).to.be(2);

Collapse
 
fsh02 profile image
Farid Shabanov

Indeed ES3 was a very important one, but as you said "It doesn't get a lot of fanfare" and it is not really considered as a major one. Probably it's just hidden in the shades of bigger releases, such as ES5 and ES6. But there's no doubt, that it played a great role in further development of the technology!

Collapse
 
efpage profile image
Eckehard

Yes, it´s amazing how much Javascript evolved from the first versions. And how fast it is executed in a modern Javascript engine.

On the other hand, a browser engine has to be always backwards compatible, so it is very unlikely that any old feature ever will be marked as "depeciated". This can make it very confusing for beginners. And it makes some new features less powerful, as they are a compromize of old and new. A good examples are Javascript classes, that somehow managed to adopt elements of other class based languages, but still generate Javascript objects. As a downside, class objects are not fully encapsulated, which makes them less secure to use.

A main reason for the popularity is, that Javascript is available everywhere. We will have to accept, that many of the historical misconceptions will stay alongside with all the good progress ist makes.

Collapse
 
fsh02 profile image
Farid Shabanov

That's right, JavaScript classes are also called "syntax sugar", because they are "not actually classes", if we compare with other languages.
It is important to keep backward compatibility, because there are millions of websites online. And most of them use old syntax, old features. For example, 90% of all websites still use jQuery. Although jQuery is a powerful tool, we can consider it as outdated, because there are more powerful tools, that are better to use

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

The most important next step would be integrating TypeScript into the official ECMA / JavaScript standard, maybe also an official transpiler like Babel.js for all of us web developers having to compile our elegant modern software into unreadable spaghetti code that we hope will work as expected, fall back to unsafe pre-ES6 notation, or make our website inaccessible to customers who have to use outdated devices and browsers. A more standardized transpilation and fallback/polyfill process might make our code use native type-safe modern syntax if supported but without failing otherwise.

Thanks for your article summing up important milestones of JS history!

Collapse
 
fsh02 profile image
Farid Shabanov

Integrating TypeScript into JS would be a huge change, but considering the different purposes of the two, it would need lots of discussions. Considering the fact that there are lots of developers, who are against TypeScript, it would be a difficult decision to make. I believe the developers should be able to select the tools they want to use - for example TypeScript or JSDoc, and keep TypeScript as an additional tool, not the part of JavaScript

Thank you for your comment and your interest!

Collapse
 
pengeszikra profile image
Peter Vivo

great article,I miss the array and object destruction which is also great ES6 features.

my favorite is pipeline operator, I was used a lot ( with babel ) and that is give a great revers direction thinking which is at the end much more logical in a functional programming. Even I was decided to make a typescript to capable use pipeline operator ... forked, but I don't have too much spare time to develop it ... sometimes.

Collapse
 
fsh02 profile image
Farid Shabanov

Array and object destructuring is really a great example! It makes some parts of the code a lot cleaner and easy to understand. There are really a lot of important changes, that were added in ES6, but if we mention everything, the article will be too big :)

I agree, that the pipeline operator is a nice feature. As it can be seen from the example, it can reduce the nesting, which always makes it hard to understand the logic. With the pipeline operator you just follow the variable and it is much cleaner!

Collapse
 
eshimischi profile image
eshimischi

Don’t forget that even though javascript is a fundamental language, typescript is also actively involved in the development of the standard, but it is also ahead of its time, many features are already available, and only after that it is adapted to modern browsers and js

Collapse
 
fsh02 profile image
Farid Shabanov

Exactly! TypeScript indeed played a great role in improving JS. There are some important features, that are available in TypeScript, but not yet available in JS. A great example would be Decorators, Private Class Fields (#) and many others.
Also important to mention, that not only TypeScript played a role in improving JS, but other technologies as well

Collapse
 
mickhence profile image
Mark henry

Since ES6 (2015), JavaScript has undergone significant evolution. ES6 introduced major features like arrow functions, classes, modules, and promises, transforming the way developers write JavaScript. Subsequent versions, from ES7 to ES13 (2022), added enhancements such as async/await, BigInt, optional chaining, nullish coalescing, and more. These updates have improved performance, developer productivity, and the language’s versatility, solidifying JavaScript's role in modern web development and beyond.

Collapse
 
fsh02 profile image
Farid Shabanov

ES6 was indeed a turning point in the development of JavaScript. Not only it introduced lots of major features, but also it was an important base for future development of the language. And since ES6, lots of important and useful features were added, just as you mentioned

Collapse
 
vladyn profile image
Vladimir Varbanov

I was almost forgot about logical assigment operators. Really nifty! Great article by the way.

Collapse
 
fsh02 profile image
Farid Shabanov

Although they are not used as often as other features, they are indeed really useful!
Thank you for your comment and interest!

Collapse
 
anderslundback profile image
Anders Lundback

Thank you for a well written article. It was a nice recap of the history and insight into what’s next.

Collapse
 
fsh02 profile image
Farid Shabanov

Thank you for your comment and your interest!

Collapse
 
wolfchamane profile image
Arturo Martínez Díaz

You are talking about JS evolution into ES6+, but your code is all TS.
Funny.

Collapse
 
fsh02 profile image
Farid Shabanov

Well, TS in the end transpiles to JS 🙂

Collapse
 
jangelodev profile image
João Angelo

Hi Farid Shabanov,
Top, very nice !
Thanks for sharing

Collapse
 
fsh02 profile image
Farid Shabanov

Thank you for your comment!

Collapse
 
avmantzaris profile image
Alex V. Mantzaris

the pipeline operator will be great, I use it in Julia Lang and makes things so much more clear.

Collapse
 
fsh02 profile image
Farid Shabanov

Agree! I love the way the pipeline operator helps to just follow the variable and see in order, what happens to it. Much cleaner, than nested code

Collapse
 
minhazhalim profile image
Minhaz Halim (Zim)

Very useful article.

Collapse
 
fsh02 profile image
Farid Shabanov

Thank you for your comment!