Will JavaScript ES5 be phased out? Will it be completely unusable?

Will JavaScript ES5 be phased out? Will it be completely unusable?

Will ES5 be eliminated?
Will it be completely unusable?

Browsers are remarkably resilient to incorrect code. They’re far more forgiving than our development environments :sweat_smile:

I say that because even if it was officially no longer supported in the web browser, it wouldn’t surprise me if it still just worked.

With respect to development tools, when I’ve looked I can see various frameworks across languages deprecating ECMAScript 5 support. To me that’s simply a response to what the current industry accepted standards are and the general agreement that ECMAScript 2015 (ES6) is more fully featured, than any impending danger that browsers are going to cease supporting ECMAScript 5.

I’ve not been able to spot any announcements from Google, or Mozilla, suggesting support will stop for their web browsers, but let me know if you have.

ECMAScript 5 still enjoys full browser support across the board:
https://caniuse.com/es5

…for now.

@Bink

AI says that the underlying layer of “ES6” is “ES5”! For example, the “class” in “es6” is actually syntactic sugar, and the underlying layer requires “es5”

AI also said that “es6” cannot run alone and needs to depend on “es5”

1 Like

What you’ve shared is clarifying I think. I found this which would confirm that.

2.3 How do I migrate my ECMAScript 5 code to ECMAScript 6?

There is nothing to do: ECMAScript 6 is a superset of ECMAScript 5. Therefore, all of your ES5 code is automatically ES6 code.

2. FAQ: ECMAScript 6

So in practice, ES5 is valid ES6 code. So if it (the web-browser) supports ES6, it supports ES5.

1 Like

There is a philosophy among people who develop web browsers and those who contribute to open web standards. They say “don’t break the web”. In other words, if a website from the year 2000 still exists on the web today, 26 years later, and they made zero changes in all that time, it should still work in modern web browsers. If the ECMAScript standards committee wants to add a new property, method, or type to JavaScript, they carefully investigate whether its name would introduce conflicts with existing known websites. And removing anything from JavaScript is essentially unthinkable. That would be considered breaking the web.

It is virtually no risk with targeting ES5 (or even older standards, like ES3!) now or in the future.

5 Likes