What is ECMAScript?

Javascript

Javascript Problem Overview


In Visual Studio when I am setting my script type to JavaScript this comes up as an option in intellisense.

A quick Google search came up with lame results, leading me to believe this isn't terribly popular to use.

  • What is it?
  • Does anyone use it? (<script type="text/ecmascript">)
  • Why?

Javascript Solutions


Solution 1 - Javascript

JavaScript is a subset of ECMAScript. JavaScript is basically ECMAScript at its core but builds upon it. Languages such as ActionScript, JavaScript, JScript all use ECMAScript as its core. As a comparison, AS/JS/JScript are 3 different cars, but they all use the same engine... each of their exteriors is different though, and there have been several modifications done to each to make it unique.

The history is, Brendan Eich created Mocha which became LiveScript, and later JavaScript. Netscape presented JavaScript to Ecma International, which develops standards and it was renamed to ECMA-262 aka ECMAScript.

It's important to note that Brendan Eich's "JavaScript" is not the same JavaScript that is a dialect of ECMAScript. He built the core language which was renamed to ECMAScript, which differs from the JavaScript which browser-vendors implement nowadays.

http://en.wikipedia.org/wiki/ECMAScript

Solution 2 - Javascript

ECMAScript is a standard. JavaScript and ActionScript are well-known implementations of the ECMAScript standard.

http://en.wikipedia.org/wiki/ECMAScript

Solution 3 - Javascript

ECMAScript = ES:

  • ECMAScript is a Standard for a scripting languages.

  • Languages like Javascript are based on the ECMAScript standard.

  • ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft).

  • ECMA means European Computer Manufacturer’s Association


On the other side:


JavaScript = JS:

  • JavaScript is the most popular implementations of the ECMAScript Standard.

  • The core features of Javascript are based on the ECMAScript standard,  but Javascript also has other additional features that are not in the ECMA specifications/standard.

  • ActionScript and JScript are another languages that implements the ECMAScript.

  • JavaScript was submitted to ECMA for standardization but due to trademark issues with the name Javascript the standard became called ECMAScript.

  • Every browser has a JavaScript interpreter.


For more details on this checkout my full answer here https://stackoverflow.com/questions/912479/what-is-the-difference-between-javascript-and-ecmascript/33748400#33748400

Solution 4 - Javascript

ECMA stands for - European Computer Manufacturer's Association. ECMAScript is a standard for a scripting language. It specifies the core features that a scripting language should provide and how those features should be implemented. Javascript was originally created at Netscape, and they wanted to standardize the language. So, they submitted the language to the European Computer Manufacturer’s Association (ECMA) for standardization. But, there were trademark issues with the name Javascript, and the standard became called ECMAScript, which is the name it holds today as well.

So you can use any scripting language that implements the ECMA standard as the web browsers support the ECMAScript interpretation when you are specifying (<script type="text/ecmascript">).

Solution 5 - Javascript

ECMA is the orgranization that standarized JavaScript. They named the language ECMAScript, however the "JavaScript" was the term that won the "name competition"

Solution 6 - Javascript

Here is a different view on this topic. It's more or less from experience, I cannot quote anything. Any JavaScript validator and everybody who works with JavaScript will tell you that

alert("hello World");

is valid JavaScript. And I'd also agree.

However, a ECMAScript validator will probably tell you it is not valid, because alert() is not part of the ECMAScript, but a typically feature of JavaScript for Browsers. There are many features of JavaScript, which make only sense in a browser environment, f.i. window.navigator, window.document, WebSocket, navigator.geolocation. Some would even say, this is not part fo JavaScript, but part of HTML5, which is not true, because HTML5 is just the markup language. However, these fancy new features are often called HTML5, even though they are implemented in JavaScript.

JavaScript can also be used for server side scripting. Then all the geolcation or media apis make no sense. So JavaScript for server side scripting is much closer to ECMAScript again, which doesn't have this typical browser features.

I couldn't really find out, whether the Math object (e.g. Math.sqrt(9)) is part of ECAMScript, or whether ECMAScript really just defines the syntax of the language and has no build in functionality whatsoever. But one ECMAScript validator accepted Math.sqrt(9) as valid ECMAScript, whereas var test=window.document; failed the ECMA validation.

Even though the following link it to a JavaScript documentation, this in my opinion is the build in feature set (objects and functions) of ECMAScript:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects

So in my opinion JavaScript is very closely tied to browsers, whereas ECMAScript has really only a very basic set of functionality (if at all).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJasonView Question on Stackoverflow
Solution 1 - Javascriptmeder omuralievView Answer on Stackoverflow
Solution 2 - JavascriptDaniel A. WhiteView Answer on Stackoverflow
Solution 3 - JavascriptMahmoud ZaltView Answer on Stackoverflow
Solution 4 - JavascriptKrishnaView Answer on Stackoverflow
Solution 5 - JavascriptcateofView Answer on Stackoverflow
Solution 6 - JavascripthaferbluesView Answer on Stackoverflow