JavaScript or ECMAScript? Help Me Out!

The term ECMAScript and JavaScript that is being used interchangeably around the web, causing confusion for many developers who are diving headfirst into JavaScript. Here you will discover everything you need to know about ECMAScript.


Introduction

Like I previously mentioned, if you are looking for information about JavaScript, you WILL inevitably see one of these terms:

  • ES6 support for modern browsers...
  • ES7 new features are...
  • ES2015 deprecated changes...
  • ES2016
  • ECMAScript 2017

What the hell are these terms?

Well, they are all actually referring to a standard, called ECMAScript.

Now this is a WARNING for you. Please never google “the difference between JavaScript and ECMAScript” or you will come across many ambiguous results like:

“ECMASCript is a standard.”

“ECMASCript is a specification.”

“ECMASCript is a programming language.”

“JavaScript is a programming language ???”

“ECMASCript is JavaScript ???”

Please, just don’t. I’ve done the hard work of researching them and will lay it out for you here.

So get ready.

If you have read my previous article on the background of JavaScript, then you already know that JS is a language designed in only 10 days. As the consequence of that, JS had no standard that it adheres to. To make things easy for communication and development, Netscape and Sun Microsystems presented the newborn JavaScript to Ecma International, a company that deal with information and communication technology standardization. To illustrate the meaning of “standard”, think of all the keyboards you have ever used. The vast majority of keyboards used Latin characters in the same order, with F1 to F12 placed in the top, a big space bar in the bottom. Why are they all seem designed the same way? That’s because most keyboard producers are using the same QWERTY layout.

No, Ecma didn’t create QWERTY standard for keyboard, the credit belongs to someone else. But Ecma did create a standard for general purpose scripting language, called the ECMA-262.

ECMA-262 is a standard like QWERTY, but instead of laying down specs for a keyboard, it lay down the specification for a scripting language. That specification is what we know as ECMAScript. To make things easier, please do visit this link for ECMA-262 document.

Let’s break things down a bit. So far we know:

  1. Ecma-262 is a document reference number for ECMAScript language specification
  2. Programming / scripting language that adheres to Ecma-262 automatically implements ECMAScript specification.
  3. JavaScript is one of those language that adheres to Ecma-262.

Conclusion: JavaScript is an implementation of ECMAScript language specification.

So that means there are more than one programming language that implements ECMAScript?

You hit it right in the eye. Two other well known ECMAScript implementation are:

  1. JScript by Microsoft, since back then the browser wars were at their peak, and Microsoft had to come up with something to fight Netscape's 80% dominance of the browser market share. To win that war, Microsoft dedicated a team of developers to implement ECMAScript for its browser, the famed Internet Explorer. Today, Microsoft has already stopped JScript (last stable release March 2011) and opted to use the name JavaScript as well. You'll find no trace of JScript in Microsoft Edge's Wikipedia page.
  2. ActionScript, the Flash scripting language for Adobe Flash Player. This scripting language had lost its popularity, and Flash will be officially discontinued by 2020.

So yeah, JavaScript is the most popular implementation of ES (and the only one you have to learn. Thank God!)

The current stable release of ES version at the time of this writing is ES2018 or ES9.

Now what is TC39?

Oh, that is a committee of people that works on JavaScript. The members of TC39 are people from companies involved in the development of JavaScript and internet browsers. Some of them are from well known tech giants like Google, Facebook, Apple, Microsoft, Intel, Paypal and Mozilla. They are the ones working to finalize ES versions.

Why ES versions are confusing?

Yeah, I do found it confusing as to why sometimes ES version is referenced by edition and sometimes by year. This stuff just make you go nuts.

So as always, I do some research on it, and it turns out that in 2015 the TC39 committee make a commitment to release a new version of ES every year. With this commitment, they also decided to change ES official naming to use the year of release number rather than edition number. You can use this table for reference:


Edition name Official name Date published
ES9 ES2018 June 2018
ES8 ES2017 June 2017
ES7 ES2016 June 2016
ES6 ES2015 June 2015
ES5.1 ES5.1 June 2011
ES5 ES5 December 2009
ES4 ES4 Abandoned
ES3 ES3 December 1999
ES2 ES2 June 1998
ES1 ES1 June 1997

So yeah.. sometimes developers called ES by edition name, sometimes by year of release. You just have to get used to it. There is also ES Next, a name reserved as a placeholder for the next version of ECMAScript. So since ES9 has been released, the ES.Next is ES10 or ES2019

Please don’t google it.. just don’t 😂

So ES2015 must be important then?

Yeah, ES2015 is an evolved version of ES standard that has been developed since 2011. This new version must step up the programming language into a level where developers can use it for the modern browsers. With the invention of Node.js and server side JavaScript becomes a trend, ES2015 added Classes and Modules. Enabling better object oriented programming support.

Is there anything else I should know?

One more thing. The implementation of ES in the browser is fragmented and the support for ES6 is pretty unreliable outside of popular browsers like Chrome, Firefox, Edge or Safari. Even modern browsers like Chrome or Safari had just recently accomodated full support of ES6. If your users are using less known browser or haven’t updated their browser for the last 9 months, you’re toast. (Or worse, still using Internet Explorer.)

That’s why JavaScript developers need to use an ES6-to-ES5 compiler to generate JS code that is compatible with all existing modern browsers. The most popular tool for generating ES5 code from ES6 is called Babel. We will cover it in time.

So there you have it! I hope you now understand the difference between JavaScript and ECMAScript. Next, we'll cover about JS lexical structure.


Get my weekly newsletter ✉️
Let's explore the exciting world of React together.
No Spam. Unsubscribe anytime