Web App Development

Javascript and EcmaScript versioning

I've been a bit confused by the Javascript version numbers. John Resig has a post about Javascript versions that clears some things up:
  • Javascript 1.6 - 1.9 are Firefox-specific versions
  • Javascript 2.0 will be the new standardized version (EcmaScript)
At the moment most browsers support Javascript 1.5 / EcmaScript 3.

EcmaScript 3.1 vsEcmaScript 4 vs EcmaScript 5

The next implemented Javascript standard will be EcmaScript 5.
At first the next version was supposed to be EcmaScript 4. It introduced a bunch of new features that prevented it from being backwards-compatible. For example yield is a keyword in EcmaScript 4, but isn't in version 3. So an old script that was valid EcmaScript 3 could have given you an error in EcmaScript 4, if you use yield as a variable or function name.

Microsoft, Yahoo, Google1 and others didn't like that and started working on the less radical EcmaScript 3.1. After a while of working separately the two working groups agreed to work on EcmaScript Harmony, which would settle the direction of future Javascript design decisions. EcmaScript 3.1 would turn into EcmaScript 5.

So, for example, the yield keyword is not included in EcmaScript 5, but is "reserved for possible future use". If you put "use strict" in your script you will get an error when using yield as a variable name.
This was in mid-2008. The EcmaScript 5.1 specification was released in June 2011.
(EcmaScript 3 was published in December 1999.)

EcmaScript 6

This version is also called EcmaScript Harmony or ES.next

Wikipedia's article on EcmaScript has some more information on the different versions. There's also a blog post by John Resig on EcmaScript Harmony. A Google Techtalk on EcmaScript 5 also includes a brief history.

1At least according to Wikipedia.

Comments


Follow me on Twitter