I have searched a lot about "what is the specification of javascript?", and I found that Ecmascript is the specification of javascript, yet I also found that javascript is an implementation of Ecmascript , and that there are other implementations of Ecmascript like Actionscript and Jscript ..etc, and this is confusing to me, because as long as javascript is an implementation of Ecmascript, then this implementation should have a distinct specification that defines it and makes it different than other Ecmascript implementations like Actionscript and Jscript.
So my question is: what is this specification that defines this Ecmascript implementation that is called "javascript"?
N.B: I have read the topic: What is the difference between JavaScript and ECMAScript?
, and it doesnt have answer to my question as it states what I have already stated which is that javascript is an implementation of ecmascript but it doesnt refer to what is the starndard or specification that defines this implementation, and this is what I am asking about
Asked
Active
Viewed 267 times
2

shady
- 33
- 2
-
1I think the implementation is defined by the JS engine or JS runtime environment, not the language itself. For example, when you do `console.log(...)`, there is no standard for the implementation of the `console` object. Different runtime environments or JS engines will yield different results. The syntax, rules, etc. however, are all defined by ECMAScript standards. – mhodges Jan 16 '20 at 19:23
-
https://www.tutorialspoint.com/What-is-the-difference-between-JavaScript-and-ECMAScript – Stefan Avramovic Jan 16 '20 at 19:23
-
Maybe this helps: [What is the difference between JavaScript and ECMAScript?](https://stackoverflow.com/questions/912479/what-is-the-difference-between-javascript-and-ecmascript) JavaScript existed before ECMAScript. But today, ECMAScript defines the formal specification that JavaScript (and others) implement. – str Jan 16 '20 at 19:24
-
This article gives an in-depth explanation on what is ecmascript and how it relates with JavaScript: https://www.freecodecamp.org/news/whats-the-difference-between-javascript-and-ecmascript-cba48c73a2b5/ – AndrewL64 Jan 16 '20 at 19:26
-
Does this answer your question? [What is the difference between JavaScript and ECMAScript?](https://stackoverflow.com/questions/912479/what-is-the-difference-between-javascript-and-ecmascript) – Bryan Jan 16 '20 at 19:26
-
(@mhodges There is a [standard for the `console` API](https://console.spec.whatwg.org/) but it is not related to ECMAScript.) – str Jan 16 '20 at 19:30
-
"*this implementation should have a distinct standard or specification that defines it*" - what makes you think that an implementation needs to be accompanied by a standard? I can write any program today without a specification. I can write a program that attempts to follow the ECMAScript specification (but would probably be bad at standards-compliance), without having my own specification. – Bergi Jan 16 '20 at 19:50
-
@Bergi then how is it determined that such and such is correct javascript and such and such is not correct javascript? what defines javascript and makes it distinct from other Ecmascript implementations? – shady Jan 16 '20 at 20:00
-
@shady What do you mean by "correct javascript"? The simplest definition of that term would be "it works", but you can come up with anything you want. "*What makes an implementation different?*" - the internal implementation and its performance characteristics, its debuggability, the additional non-standard features, the bugs where it does not follow the specification, and the custom interpretations of ambiguous wording in the specification. – Bergi Jan 16 '20 at 20:07