Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Javascript and ECMA script? [duplicate]

Tags:

javascript

What would happen if I start to define my script tags as ECMA? Will it execute to a different standard?

Does anyone actually use ECMA script instead of straight up Javascript...?

like image 683
Exitos Avatar asked Nov 24 '10 21:11

Exitos


People also ask

What is difference between ECMAScript and JavaScript?

JavaScript is a general-purpose scripting language that conforms to the ECMAScript specification. The ECMAScript specification is a blueprint for creating a scripting language. JavaScript is an implementation of that blueprint. On the whole, JavaScript implements the ECMAScript specification as described in ECMA-262.

Is JavaScript ECMAScript?

JavaScript is a language based on ECMAScript. A standard for scripting languages like JavaScript, JScript is ECMAScript. JavaScript is considered as one of the most popular implementations of ECMAScript.

Why JavaScript is called ECMAScript?

ECMAScript = ES: ECMAScript is a Standard for 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.

What is difference between JavaScript and ES6?

JavaScript ES6 (also known as ECMAScript 2015 or ECMAScript 6) is the newer version of JavaScript that was introduced in 2015. ECMAScript is the standard that JavaScript programming language uses. ECMAScript provides the specification on how JavaScript programming language should work.


1 Answers

ECMAScript is a standard. JavaScript is an implementation of that standard (edition 3 of that standard to be more exact).

Other implementations of ECMAScript are ActionScript and JScript.

Also note that there isn't one JavaScript. Each JavaScript engine may implement its own version of the language as long as it meets the ECMAScript requirements. This means that browsers (JS engines) may have additional functionality, but they all must have the base ECMAScript functionality.

And now, to answer your question, according to RFC 4329, if the media type is set to application/ecmascript, rather than application/javascript, it must adhere to a stricter standard.

This document defines equivalent processing requirements for the types text/javascript, text/ecmascript, and application/javascript. Use of and support for the media type application/ecmascript is considerably less widespread than for other media types defined in this document. Using that to its advantage, this document defines stricter processing rules for this type to foster more interoperable processing.

like image 95
Alin Purcaru Avatar answered Sep 20 '22 21:09

Alin Purcaru