JavaScript和ECMAScript有什么区别?

时间:2021-06-08 13:19:45

What's the difference between ECMAScript and JavaScript? From what I've deduced, ECMAScript is the standard and JavaScript is the implementation. Is this correct?

ECMAScript和JavaScript之间有什么区别?根据我的推断,ECMAScript是标准,JavaScript是实现。这是正确的吗?

17 个解决方案

#1


171  

ECMAScript is the language, whereas JavaScript, JScript, and even ActionScript 3 are called "dialects". Wikipedia sheds some light on this.

ECMAScript是语言,而JavaScript、JScript甚至ActionScript 3都被称为“方言”。*对此给出了一些解释。

#2


488  

I think a little history lesson is due.

我想应该有一点历史课。

JavaScript was originally named Mocha and changed to Livescript but ultimately became JavaScript.

JavaScript最初被命名为Mocha,并改为livcript,但最终成为了JavaScript。

It's important to note that JavaScript came before ECMAscript and the history will tell you why.

需要注意的是,JavaScript是在ECMAscript之前出现的,历史会告诉你原因。

To start from the beginning, JavaScript derived its name from Java and initially Brendan Eich (the creator of JS) was asked to develop a language that resembled Java for the web for Netscape.

从一开始,JavaScript就从Java衍生出了它的名字,最初,人们要求Brendan Eich (JS的创造者)为Netscape开发一种类似于Java的语言。

Eich, however decided that Java was too complicated with all its rules and so set out to create a simpler language that even a beginner could code in. This is evident in such things like the relaxing of the need to have a semicolon.

然而,Eich认为Java的所有规则都太复杂了,因此开始创建一种更简单的语言,即使是初学者也可以编写代码。这在诸如需要使用分号之类的事情中是很明显的。

After the language was complete, the marketing team of Netscape requested Sun to allow them to name it JavaScript as a marketing stunt and hence why most people who have never used JavaScript think it's related to Java.

语言完成后,Netscape的营销团队要求Sun允许他们将其命名为JavaScript作为营销噱头,因此大多数从未使用过JavaScript的人认为它与Java有关。

About a year or two after JavaScript's release in the browser, Microsoft's IE took the language and started making its own implementations such as JScript. At the same time, IE was dominating the market and not long after Netscape had to shut its project.

在JavaScript在浏览器中发布一到两年之后,微软的IE采用了这种语言,并开始制作自己的实现,比如JScript。与此同时,IE在市场上占据主导地位,而就在网景公司不得不关闭其项目后不久。

Before Netscape went down, they decided to start a standard that would guide the path of JavaScript, named ECMAScript.

在Netscape倒下之前,他们决定启动一个标准来指导JavaScript的路径,命名为ECMAScript。

ECMAScript had a few releases and in 1999 they released their last version (ECMAScript 3) before they went into hibernation for the next 10 years. During this 10 years, Microsoft dominated the scenes but at the same time they weren't improving their product and hence Firefox was born (led by Eich) and a whole heap of other browsers such as Chrome, Opera.

ECMAScript有几个版本,1999年发布了最后一个版本(ECMAScript 3),之后十年都处于休眠状态。在这10年里,微软占据了主导地位,但与此同时,他们并没有改进他们的产品,因此Firefox诞生了(由Eich领导)和一大堆其他浏览器,如Chrome、Opera。

ECMAScript released its 5th Edition in 2009 (the 4th edition was abandoned) with features such as strict mode. Since then, ECMAScript has gained a lot of momentum and is scheduled to release its 6th Edition in a few months from now with the biggest changes its had thus far.

ECMAScript在2009年发布了第5版(第4版被抛弃),并提供了严格模式等特性。从那以后,ECMAScript得到了很多支持,并计划在几个月后发布第6版,并做出了迄今为止最大的改动。

You can use a list of features for ECMAScript 6 here http://kangax.github.io/es5-compat-table/es6/ and also the browser support. You can even start writing Ecmascript 6 like you do with CoffeeScript and use a compiler to compile down to Ecmascript 5.

您可以在这里使用ECMAScript 6的特性列表http://kangax.github。io/es5-compat-table/es6/以及浏览器支持。您甚至可以像使用CoffeeScript那样编写Ecmascript 6,并使用编译器来编译到Ecmascript 5。

Whether ECMAScript is the language and JavaScript is a dialect is arguable, but not important. If you continue to think like this it might confuse you. There is no compiler out there that would run ECMAScript, and I believe JavaScript is considered the Language which implements a standard called ECMAScript.

ECMAScript是语言,JavaScript是否是方言是有争议的,但并不重要。如果你继续这样想,你可能会感到困惑。那里没有运行ECMAScript的编译器,我相信JavaScript被认为是实现了一个名为ECMAScript的标准的语言。

There are also other noticeable languages that implement ECMAScript such as ActionScript (used for Flash)

还有其他实现ECMAScript的语言,比如ActionScript(用于Flash)

#3


117  

ECMAScript = ES:

ECMAScript = ES:

  • ECMAScript is a Standard for scripting languages.

    ECMAScript是脚本语言的标准。

  • Languages like Javascript are based on the ECMAScript standard.

    像Javascript这样的语言是基于ECMAScript标准的。

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

    ECMA标准基于几种原始技术,最著名的是JavaScript (Netscape)和JScript (Microsoft)。

  • ECMA means European Computer Manufacturer’s Association

    ECMA的意思是欧洲电脑制造商协会

JavaScript = JS:

JavaScript = JS:

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

    JavaScript是ECMAScript标准最流行的实现。

  • 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.

    Javascript的核心特性基于ECMAScript标准,但是Javascript也有其他ECMA规范/标准中没有的特性。

  • ActionScript and JScript are other languages that implement the ECMAScript.

    ActionScript和JScript是其他实现ECMAScript的语言。

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

    JavaScript被提交给ECMA进行标准化,但是由于商标问题,这个标准被称为ECMAScript。

  • Every browser has a JavaScript interpreter.

    每个浏览器都有一个JavaScript解释器。

ES5 = ECMAScript 5:

ES5 = ECMAScript 5:

  • ES5 is a version of the ECMAScript (old/current one).

    ES5是ECMAScript的一个版本(旧的/当前的)。

  • ES5 is the JavaScript you know and use in the browser today.

    ES5是一种在浏览器中使用的JavaScript。

  • ES5 does not require a build step (transpilers) to transform it into something that will run in today's browsers.

    ES5不需要构建步骤(transilers)将其转换为在今天的浏览器中运行的东西。

  • ECMAScript version 5 was finished in December 2009,  the latest versions of all major browsers (Chrome, Safari, Firefox, and IE)  have implemented version 5.

    ECMAScript版本5于2009年12月完成,所有主流浏览器(Chrome、Safari、Firefox和IE)的最新版本都实现了版本5。

  • Version 5.1 was finished in June, 2011.

    5.1版本于2011年6月完成。

ES6 = ECMAScript 6 = ES2015 = ECMAScript 2015:

ES6 = ECMAScript 6 = ES2015 = ECMAScript 2015:

  • ES2015 is a version of the ECMAScript (new/future one).

    ES2015是ECMAScript(新/未来)的一个版本。

  • Officially the name ES2015 should be used instead of ES6.

    官方应该使用ES2015而不是ES6。

  • ES6 will tackle many of the core language shortcomings addressed in  TypeScript and CoffeeScript.

    ES6将解决打字稿和咖啡稿中提到的许多核心语言缺陷。

  • ES6 is the next iteration of JavaScript, but it does not run in today's browsers.

    ES6是JavaScript的下一个迭代,但是它不会在今天的浏览器中运行。

  • There are quite a few transpilers that will export ES5 for running in browsers.

    有相当多的传输器将导出ES5以便在浏览器中运行。

BabelJS:

BabelJS:

  • BabelJS is the most popular transpiler that transforms new JavaScript ES6 to Old JavaScript ES5.

    BabelJS是最流行的传输器,它将新的JavaScript ES6转换为旧的JavaScript ES5。

  • BabelJS makes it possible for writing the next generation of JavaScript today (means ES2015).

    BabelJS使得今天编写下一代JavaScript成为可能(意为ES2015)。

  • BabelJS simply takes ES2015 file and transform it into ES5 file.

    BabelJS只需获取ES2015文件并将其转换为ES5文件。

  • Current browsers versions can now understand the new JavaScript code (ES2015), even if they don't yet support it.

    当前的浏览器版本现在可以理解新的JavaScript代码(ES2015),即使它们还不支持它。

TypeScript and CoffeeScript:

打印稿和CoffeeScript:

  • Both provides syntactic sugar on top of ES5  and then are transcompiled into ES5 compliant JavaScript. 

    两者都在ES5之上提供语法糖块,然后被编译成符合ES5的JavaScript。

  • You write TypeScript or CoffeeScript then the transpiler transforms it into ES5 JavaScript.

    你写打字稿或咖啡稿,然后传送者把它转换成ES5 JavaScript。

#4


40  

Technically ECMAScript is the language that everyone is using and implementing -- it is the specification created many years ago when Netscape and Microsoft sat down and attempted to standardise the scripting between JavaScript (Netscape's scripting language) and JScript (Microsoft's).

从技术上讲,ECMAScript是每个人都在使用和实现的语言——它是多年前Netscape和Microsoft所创建的规范,并试图在JavaScript (Netscape的脚本语言)和JScript(微软的)之间标准化脚本。

Subsequently all these engines are ostensibly implementing ECMAScript, however JavaScript (the name) now hangs around for both traditional naming reasons, and as a marketing term by Mozilla for their various non-standard extensions (which they want to be able to actually "version")

随后,所有这些引擎表面上都实现了ECMAScript,但是JavaScript(名称)由于传统的命名原因,以及Mozilla对其各种非标准扩展的营销术语(他们希望能够真正实现“版本”)都被挂起了。

#5


27  

JavaScript = ECMAScript + DOM API;

JavaScript = ECMAScript + DOM API;

  • ECMAScript® Language Specification defines all logic for creating and editing objects, arrays, numbers, etc...

    ECMAScript®语言规范定义所有逻辑创建和编辑对象、数组、数字,等等……

  • DOM API makes it possible to communicate with HTML/XML documents (e.g. document.getElementById('id');).

    DOM API使与HTML/XML文档(例如document.getElementById('id');)进行通信成为可能。

History of JavaScript naming:

JavaScript命名的历史:

Mocha ► LiveScript ► JavaScript ► (part of JS resulted in) ECMA-262 ► ECMAScript ► JavaScript (consists of ECMAScript + DOM API)

摩卡►LiveScript JavaScript►►(JS导致的一部分)ecma - 262►ECMAScript►JavaScript(包括ECMAScript + DOM API)

#6


19  

What is ECMAScript i.e. ES?

什么是ECMAScript也就是ES?

ECMAScript is a standard for a scripting language, and the Javascript language is based on the ECMAScript standard.

ECMAScript是脚本语言的标准,Javascript语言基于ECMAScript标准。

Is Javascript exactly the same as ECMAScript?

Javascript和ECMAScript完全一样吗?

  • No, Javascript is not exactly equivalent to ECMAScript.
  • 不,Javascript并不完全等同于ECMAScript。
  • 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.
  • Javascript的核心特性基于ECMAScript标准,但是Javascript也有其他ECMA规范/标准中没有的特性。

JavaScript = ECMAScript + DOM API;

JavaScript = ECMAScript + DOM API;

DOM API like: document.getElementById('id');

DOM API:. getelementbyid(“id”);

Do other languages use the ECMAScript standard?

其他语言使用ECMAScript标准吗?

  • Yes, there are languages other than JavaScript that also implement the ECMAScript Standard as their core.
  • 是的,除了JavaScript之外还有其他语言,它们也实现了ECMAScript标准作为其核心。
  • ActionScript (used by Adobe Flash) and JScript (used by Microsoft) are both languages that implement the ECMAScript standard.
  • ActionScript(由Adobe Flash使用)和JScript(由微软使用)都是实现ECMAScript标准的语言。

Why is it called ECMAScript?

为什么叫ECMAScript?

  • 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.
  • Javascript最初是在Netscape中创建的,他们想要标准化这种语言。因此,他们向欧洲计算机制造商协会(ECMA)提交了标准化语言。
  • But, there were trademark issues with the name Javascript, and the standard became called ECMAScript, which is the name it holds today as well.
  • 但是,Javascript这个名字有商标问题,标准变成了ECMAScript,这也是它今天的名字。
  • Because of trademark issues, Microsoft’s version of the language is called JScript – even though JScript is, at it’s core, the same language as Javascript.
  • 由于商标问题,微软版本的语言被称为JScript——尽管它的核心是与Javascript相同的语言。

< Update: > For those who care about history

<更新:> 给那些关心历史的人

  • 1995: Originally named Mocha and changed to Livescript
  • 1995年:原名摩卡,改名为Livescript
  • 1997: ECMAScript standard is established
  • 1997年:建立了ECMAScript标准。
  • 1999: ES3 comes out and IE5 is all the rage
  • 1999年:ES3问世,IE5风靡一时
  • 2000–2005: XMLHttpRequest, a.k.a. AJAX, gains popularity in app such as Outlook Web Access (2000) and Oddpost (2002), Gmail (2004) and Google Maps (2005).
  • 2000 - 2005: XMLHttpRequest,又称AJAX,在Outlook Web Access(2000)和Oddpost(2002)、Gmail(2004)和谷歌Maps(2005)等应用中越来越流行。
  • 2009: ES5 comes out (this is what most of us use now) with forEach, Object.keys, Object.create (specially for Douglas Crockford), and standard JSON
  • 2009: ES5在forEach对象中出现(这是我们大多数人现在使用的)。钥匙,对象。创建(特别为Douglas Crockford创建)和标准JSON
  • 2015: ES6/ECMAScript2015 comes out; it has mostly syntactic sugar, because people weren’t able to agree on anything more ground breaking (ES7?)
  • 2015:ES6 / ECMAScript2015出来;它主要含有句法上的糖分,因为人们无法就更多的突破达成一致(ES7?)

#7


13  

Various JavaScript versions are implementations of the ECMAScript standard.

各种JavaScript版本都是ECMAScript标准的实现。

#8


10  

i know this is an old post but hopefully this will help someone.

我知道这是一个旧帖子,但希望这能帮助到别人。

In the 1990’s different versions of js started coming out like javascript from netscape, Js script from Microsoft. So ecmascript was introduced as a standard. But ecmascript forms only a part of javascript which specifies its core syntax,types,objects etc. Probably that explains the inconsistent implementations of javascript across diff. browsers

在20世纪90年代,不同版本的js开始出现,比如netscape的javascript,微软的js脚本。所以ecmascript作为标准被引入。但是ecmascript只是javascript的一部分,它指定了javascript的核心语法、类型和对象等

Reference - Wrox(Professional Javascript For Web Developers)

参考- Wrox(Web开发人员的专业Javascript)

#9


9  

In my understanding, ECMAScript is the "Theory" or "Specification", and Javascript is "Practicals" or "Implementation".

在我的理解中,ECMAScript是“理论”或“规范”,而Javascript则是“实践性”或“实现”。

#10


8  

JavaScript is a ECMAScript language.

JavaScript是一种ECMAScript语言。

ECMAScript isn't necessarily JavaScript.

ECMAScript不一定JavaScript。

#11


6  

Existing answers paraphrase the main point quite well.

现有的答案很好地解释了要点。

The main point is that ECMAScript is the bare abstract language, without any domain specific extensions, it's useless in itself. The specification defines only the language and the core objects of it.

主要的一点是,ECMAScript是纯抽象语言,没有任何特定于域的扩展,它本身是无用的。规范只定义语言和它的核心对象。

While JavaScript and ActionScript and other dialects add the domain specific library to it, so you can use it for something meaningful.

而JavaScript、ActionScript和其他方言则向它添加特定于域的库,因此您可以将它用于有意义的事情。

There are many ECMAScript engines, some of them are open source, others are proprietary. You can link them into your program then add your native functions to the global object so your program becomes scriptable. Although most often they are used in browsers.

有很多ECMAScript引擎,有些是开源的,有些是私有的。您可以将它们链接到您的程序中,然后将您的本机函数添加到全局对象中,以便您的程序成为可脚本化的。尽管它们通常在浏览器中使用。

#12


4  

Javascript was the original name, meant to capitalize on the popularity of java. ECMA is the standards body that oversees the standard that was eventually put in place so the names are roughly equivalent.

Javascript是最初的名称,旨在利用java的流行。ECMA是一个标准机构,负责监督最终制定的标准,因此这些名称大致相同。

Implementations have other names, like V8 or Rhino, etc.

实现有其他名称,如V8或Rhino等。

#13


1  

I doubt we'd ever use the word "ECMAScript" if not for the fact that the name "JavaScript" is owned by Sun. For all intents and purposes, the language is JavaScript. You don't go to the bookstore looking for ECMAScript books, do you?

如果不是因为“JavaScript”这个名字是Sun的,我怀疑我们是否会使用“ECMAScript”这个词。实际上,语言是JavaScript。你不会去书店找ECMAScript的书,是吗?

It's a bit too simple to say that "JavaScript" is the implementation. JScript is Microsoft's implementation.

说“JavaScript”是实现,这有点太简单了。JScript是微软的实现。

#14


1  

JavaScript is one branch of languages formed around the ECMAScript standard. I believe ECMA is the European Computer Manufacturers Association, not that this is really relevant or anything.

JavaScript是围绕ECMAScript标准形成的语言分支之一。我相信ECMA是欧洲电脑制造商协会,并不是说它真的相关。

Don't forget another popular language formed around the ECMA Script standard is ActionScript, used in Adobe Flash/Flex.

不要忘记在ECMA脚本标准中形成的另一种流行语言是ActionScript,它在Adobe Flash/Flex中使用。

#15


1  

ECMAScript is a standard for JavaScript, look at these statements from MDN:

ECMAScript是JavaScript标准,参考MDN中的语句:

JavaScript和ECMAScript有什么区别?

JavaScript

JavaScript (JS) is a lightweight interpreted or JIT-compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more about JavaScript.

JavaScript是一种轻量级的解释或jit编译的编程语言,具有一流的函数。虽然它是Web页面的脚本语言,但许多非浏览器环境也使用它,比如node。js、Apache CouchDB和adobeacrobat。JavaScript是一种基于原型、多范式、动态语言,支持面向对象、命令式和声明式(例如函数式编程)风格。阅读更多关于JavaScript。


ECMAScript

The standard for JavaScript is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. On June 17, 2015, ECMA International published the sixth major version of ECMAScript, which is officially called ECMAScript 2015, and was initially referred to as ECMAScript 6 or ES6. Since then, ECMAScript standards are on yearly release cycles. This documentation refers to the latest draft version, which is currently ECMAScript 2018.

JavaScript的标准是ECMAScript。到2012年,所有现代浏览器都完全支持ECMAScript 5.1。旧浏览器至少支持ECMAScript 3。2015年6月17日,ECMA International出版了《ECMAScript第六版》,正式名称为《ECMAScript 2015》,最初被称为《ECMAScript 6》或《ES6》。从那时起,ECMAScript标准每年发布一次。该文档参考了最新的草案版本,目前是2018年的ECMAScript。

For more info, visit here

更多信息,请访问这里

#16


1  

ECMAScript is nothing but a standard or specification defined in order to create different scripting languages and one of them happens to be JavaScript. It has been created with the sole purpose of cross-browser compatibility

ECMAScript只是为创建不同脚本语言而定义的标准或规范,其中之一恰好是JavaScript。它是为了跨浏览器兼容性而创建的

A standard guarantees that if somebody writes a code following the rules of the standard then the code would run fine in a browser(in case of javascript) if the browser implements the same standard.

标准保证,如果有人按照标准的规则编写代码,那么如果浏览器实现了相同的标准,那么代码在浏览器中运行良好(如果是javascript)。

Why do we need a standard?

为什么我们需要一个标准?

When Javascript was first created by Netscape then there was a war going on between all the browser vendors in the market . Microsoft implemented its own version of javascript in internet explorer . Similarly other browser vendors implemented their own versions.

当Netscape最初创建Javascript时,市场上所有浏览器供应商之间都在进行一场战争。微软在internet explorer中实现了自己的javascript版本。类似地,其他浏览器厂商也实现了自己的版本。

All this created a huge problem for the developers.One code ran fine on Netscape but was a total waste on Internet Explorer . To solve cross browser compatibilty Javascript was standardised by ECMA international ; hence the name ECMAscript.

所有这些都给开发人员带来了巨大的问题。一段代码在Netscape上运行良好,但在Internet Explorer上完全是浪费。为解决跨浏览器兼容问题,ECMA international对Javascript进行了标准化;因此ECMAscript的名称。

All browers agreed to implement ECMAscript(though it took a lot of time).

所有的浏览器都同意实现ECMAscript(尽管这花费了很多时间)。

The result is that now the same code runs fine in all browsers.

结果是,现在相同的代码在所有浏览器中运行良好。

The exception is DOM(Document object model) . DOM is still interpreted in different ways in different browsers . However there is good news . Slowly all browsers are adhering to the same DOM standard .

例外是DOM(文档对象模型)。DOM在不同的浏览器中仍然以不同的方式解释。不过也有好消息。慢慢地,所有浏览器都遵循相同的DOM标准。

#17


0  

Here are my findings:

以下是我的发现:

JavaScript: The Definitive Guide, written by David Flanagan provides a very concise explanation:

由David Flanagan撰写的权威指南提供了一个非常简明的解释:

JavaScript was created at Netscape in the early days of the Web, and technically, "JavaScript" is a trademark licensed from Sun Microsystems (now Oracle) used to describe Netscape's (now Mozilla's) implementation of the language. Netscape submitted the language for standardization to ECMA and because of trademark issues, the standardized version of the language was stuck with the awkward name "ECMAScript". For the same trademark reasons, Microsoft's version of the language is formally known as "JScript". In practice, just about everyone calls the language JavaScript.

JavaScript是在早期的网络时代由Netscape创建的,技术上来说,“JavaScript”是一个由Sun微系统(现在的Oracle)授权的商标,用来描述Netscape(现在的Mozilla)的语言实现。Netscape向ECMA提交了该语言的标准化,由于商标问题,该语言的标准化版本被卡在了“ECMAScript”这个尴尬的名字中。出于同样的商标原因,微软的版本被正式称为“JScript”。实际上,几乎每个人都调用JavaScript语言。

A blog post by Microsoft seems to agree with what Flanagan explains by saying..

微软的一篇博客似乎同意弗拉纳根的解释:

ECMAScript is the official name for the JavaScript language we all know and love.

ECMAScript是我们都熟悉并喜欢的JavaScript语言的官方名称。

.. which makes me think all occurrences of JavaScript in this reference post (by Microsoft again) must be replaced by ECMASCript. They actually seem to be careful with using ECMAScript only in this, more recent and more technical documentation page.

. .这让我想到,在这篇参考文章中出现的所有JavaScript必须被ECMASCript取代。实际上,他们似乎只在最近的技术文档页面上使用ECMAScript。

w3schools.com seems to agree with the definitions above:

w3schools.com似乎同意上面的定义:

JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997. ECMA-262 is the official name of the standard. ECMAScript is the official name of the language.

JavaScript是布伦丹·艾赫在1995年发明的,并在1997年成为ECMA标准。ECMA-262是标准的官方名称。ECMAScript是该语言的官方名称。

The key here is: the official name of the language.

这里的关键是:语言的官方名称。

If you check Mozilla 's JavaScript version pages, you will encounter the following statement:

如果您查看Mozilla的JavaScript版本页面,您将看到以下语句:

Deprecated. The explicit versioning and opt-in of language features was Mozilla-specific and are in process of being removed. Firefox 4 was the last version which referred to a JavaScript version (1.8.5). With new ECMA standards, JavaScript language features are now often mentioned with their initial definition in ECMA-262 Editions such as ECMAScript 2015.

弃用。语言特性的显式版本控制和选择是特定于mozilla的,并且正在被移除。Firefox 4是最后一个提到JavaScript版本的版本(1.8.5)。有了新的ECMA标准,JavaScript语言特性现在常常会在ECMA-262版本(如ECMAScript 2015)中被首次定义。

and when you see the recent release notes, you will always see reference to ECMAScript standards, such as:

当您看到最近的发行说明时,您总是会看到对ECMAScript标准的引用,比如:

  • The ES2015 Symbol.toStringTag property has been implemented (bug 1114580).

    ES2015符号。已经实现了toStringTag属性(bug 1114580)。

  • The ES2015 TypedArray.prototype.toString() and TypedArray.prototype.toLocaleString() methods have been implemented (bug 1121938).

    ES2015 TypedArray.prototype.toString()和TypedArray.prototype.toLocaleString()方法已经实现(bug 1121938)。

Mozilla Web Docs also has a page that explains the difference between ECMAScript and JavaScript:

Mozilla Web文档也有一个页面来解释ECMAScript和JavaScript的区别:

However, the umbrella term "JavaScript" as understood in a web browser context contains several very different elements. One of them is the core language (ECMAScript), another is the collection of the Web APIs, including the DOM (Document Object Model).

但是,在web浏览器上下文中理解的统称“JavaScript”包含几个非常不同的元素。其中之一是核心语言(ECMAScript),另一个是Web api的集合,包括DOM(文档对象模型)。

Conclusion

结论

To my understanding, people use the word JavaScript somewhat liberally to refer to the core ECMAScript specification.

在我的理解中,人们使用JavaScript这个词来指代核心的ECMAScript规范。

I would say, all the modern JavaScript implementations (or JavaScript Engines) are in fact ECMAScript implementations. Check the definition of the V8 Engine from Google, for example:

我想说,所有的现代JavaScript实现(或JavaScript引擎)实际上都是ECMAScript实现。检查谷歌中V8引擎的定义,例如:

V8 is Google’s open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google, and in Node.js, among others. It implements ECMAScript as specified in ECMA-262.

V8是谷歌的开源高性能JavaScript引擎,用c++编写,在谷歌Chrome中使用,它是谷歌和Node的开源浏览器。js等等。它实现了ECMAScript,如ECMA-262中所述。

They seem to use the word JavaScript and ECMAScript interchangeably, and I would say it is actually an ECMAScript engine?

它们似乎可以互换使用JavaScript和ECMAScript,我想说它实际上是一个ECMAScript引擎?

So most JavaScript Engines are actually implementing the ECMAScript standard, but instead of calling them ECMAScript engines, they call themselves JavaScript Engines. This answer also supports the way I see the situation.

因此,大多数JavaScript引擎实际上都在实现ECMAScript标准,但是他们没有调用ECMAScript引擎,而是称自己为JavaScript引擎。这个答案也支持了我对形势的看法。

#1


171  

ECMAScript is the language, whereas JavaScript, JScript, and even ActionScript 3 are called "dialects". Wikipedia sheds some light on this.

ECMAScript是语言,而JavaScript、JScript甚至ActionScript 3都被称为“方言”。*对此给出了一些解释。

#2


488  

I think a little history lesson is due.

我想应该有一点历史课。

JavaScript was originally named Mocha and changed to Livescript but ultimately became JavaScript.

JavaScript最初被命名为Mocha,并改为livcript,但最终成为了JavaScript。

It's important to note that JavaScript came before ECMAscript and the history will tell you why.

需要注意的是,JavaScript是在ECMAscript之前出现的,历史会告诉你原因。

To start from the beginning, JavaScript derived its name from Java and initially Brendan Eich (the creator of JS) was asked to develop a language that resembled Java for the web for Netscape.

从一开始,JavaScript就从Java衍生出了它的名字,最初,人们要求Brendan Eich (JS的创造者)为Netscape开发一种类似于Java的语言。

Eich, however decided that Java was too complicated with all its rules and so set out to create a simpler language that even a beginner could code in. This is evident in such things like the relaxing of the need to have a semicolon.

然而,Eich认为Java的所有规则都太复杂了,因此开始创建一种更简单的语言,即使是初学者也可以编写代码。这在诸如需要使用分号之类的事情中是很明显的。

After the language was complete, the marketing team of Netscape requested Sun to allow them to name it JavaScript as a marketing stunt and hence why most people who have never used JavaScript think it's related to Java.

语言完成后,Netscape的营销团队要求Sun允许他们将其命名为JavaScript作为营销噱头,因此大多数从未使用过JavaScript的人认为它与Java有关。

About a year or two after JavaScript's release in the browser, Microsoft's IE took the language and started making its own implementations such as JScript. At the same time, IE was dominating the market and not long after Netscape had to shut its project.

在JavaScript在浏览器中发布一到两年之后,微软的IE采用了这种语言,并开始制作自己的实现,比如JScript。与此同时,IE在市场上占据主导地位,而就在网景公司不得不关闭其项目后不久。

Before Netscape went down, they decided to start a standard that would guide the path of JavaScript, named ECMAScript.

在Netscape倒下之前,他们决定启动一个标准来指导JavaScript的路径,命名为ECMAScript。

ECMAScript had a few releases and in 1999 they released their last version (ECMAScript 3) before they went into hibernation for the next 10 years. During this 10 years, Microsoft dominated the scenes but at the same time they weren't improving their product and hence Firefox was born (led by Eich) and a whole heap of other browsers such as Chrome, Opera.

ECMAScript有几个版本,1999年发布了最后一个版本(ECMAScript 3),之后十年都处于休眠状态。在这10年里,微软占据了主导地位,但与此同时,他们并没有改进他们的产品,因此Firefox诞生了(由Eich领导)和一大堆其他浏览器,如Chrome、Opera。

ECMAScript released its 5th Edition in 2009 (the 4th edition was abandoned) with features such as strict mode. Since then, ECMAScript has gained a lot of momentum and is scheduled to release its 6th Edition in a few months from now with the biggest changes its had thus far.

ECMAScript在2009年发布了第5版(第4版被抛弃),并提供了严格模式等特性。从那以后,ECMAScript得到了很多支持,并计划在几个月后发布第6版,并做出了迄今为止最大的改动。

You can use a list of features for ECMAScript 6 here http://kangax.github.io/es5-compat-table/es6/ and also the browser support. You can even start writing Ecmascript 6 like you do with CoffeeScript and use a compiler to compile down to Ecmascript 5.

您可以在这里使用ECMAScript 6的特性列表http://kangax.github。io/es5-compat-table/es6/以及浏览器支持。您甚至可以像使用CoffeeScript那样编写Ecmascript 6,并使用编译器来编译到Ecmascript 5。

Whether ECMAScript is the language and JavaScript is a dialect is arguable, but not important. If you continue to think like this it might confuse you. There is no compiler out there that would run ECMAScript, and I believe JavaScript is considered the Language which implements a standard called ECMAScript.

ECMAScript是语言,JavaScript是否是方言是有争议的,但并不重要。如果你继续这样想,你可能会感到困惑。那里没有运行ECMAScript的编译器,我相信JavaScript被认为是实现了一个名为ECMAScript的标准的语言。

There are also other noticeable languages that implement ECMAScript such as ActionScript (used for Flash)

还有其他实现ECMAScript的语言,比如ActionScript(用于Flash)

#3


117  

ECMAScript = ES:

ECMAScript = ES:

  • ECMAScript is a Standard for scripting languages.

    ECMAScript是脚本语言的标准。

  • Languages like Javascript are based on the ECMAScript standard.

    像Javascript这样的语言是基于ECMAScript标准的。

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

    ECMA标准基于几种原始技术,最著名的是JavaScript (Netscape)和JScript (Microsoft)。

  • ECMA means European Computer Manufacturer’s Association

    ECMA的意思是欧洲电脑制造商协会

JavaScript = JS:

JavaScript = JS:

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

    JavaScript是ECMAScript标准最流行的实现。

  • 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.

    Javascript的核心特性基于ECMAScript标准,但是Javascript也有其他ECMA规范/标准中没有的特性。

  • ActionScript and JScript are other languages that implement the ECMAScript.

    ActionScript和JScript是其他实现ECMAScript的语言。

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

    JavaScript被提交给ECMA进行标准化,但是由于商标问题,这个标准被称为ECMAScript。

  • Every browser has a JavaScript interpreter.

    每个浏览器都有一个JavaScript解释器。

ES5 = ECMAScript 5:

ES5 = ECMAScript 5:

  • ES5 is a version of the ECMAScript (old/current one).

    ES5是ECMAScript的一个版本(旧的/当前的)。

  • ES5 is the JavaScript you know and use in the browser today.

    ES5是一种在浏览器中使用的JavaScript。

  • ES5 does not require a build step (transpilers) to transform it into something that will run in today's browsers.

    ES5不需要构建步骤(transilers)将其转换为在今天的浏览器中运行的东西。

  • ECMAScript version 5 was finished in December 2009,  the latest versions of all major browsers (Chrome, Safari, Firefox, and IE)  have implemented version 5.

    ECMAScript版本5于2009年12月完成,所有主流浏览器(Chrome、Safari、Firefox和IE)的最新版本都实现了版本5。

  • Version 5.1 was finished in June, 2011.

    5.1版本于2011年6月完成。

ES6 = ECMAScript 6 = ES2015 = ECMAScript 2015:

ES6 = ECMAScript 6 = ES2015 = ECMAScript 2015:

  • ES2015 is a version of the ECMAScript (new/future one).

    ES2015是ECMAScript(新/未来)的一个版本。

  • Officially the name ES2015 should be used instead of ES6.

    官方应该使用ES2015而不是ES6。

  • ES6 will tackle many of the core language shortcomings addressed in  TypeScript and CoffeeScript.

    ES6将解决打字稿和咖啡稿中提到的许多核心语言缺陷。

  • ES6 is the next iteration of JavaScript, but it does not run in today's browsers.

    ES6是JavaScript的下一个迭代,但是它不会在今天的浏览器中运行。

  • There are quite a few transpilers that will export ES5 for running in browsers.

    有相当多的传输器将导出ES5以便在浏览器中运行。

BabelJS:

BabelJS:

  • BabelJS is the most popular transpiler that transforms new JavaScript ES6 to Old JavaScript ES5.

    BabelJS是最流行的传输器,它将新的JavaScript ES6转换为旧的JavaScript ES5。

  • BabelJS makes it possible for writing the next generation of JavaScript today (means ES2015).

    BabelJS使得今天编写下一代JavaScript成为可能(意为ES2015)。

  • BabelJS simply takes ES2015 file and transform it into ES5 file.

    BabelJS只需获取ES2015文件并将其转换为ES5文件。

  • Current browsers versions can now understand the new JavaScript code (ES2015), even if they don't yet support it.

    当前的浏览器版本现在可以理解新的JavaScript代码(ES2015),即使它们还不支持它。

TypeScript and CoffeeScript:

打印稿和CoffeeScript:

  • Both provides syntactic sugar on top of ES5  and then are transcompiled into ES5 compliant JavaScript. 

    两者都在ES5之上提供语法糖块,然后被编译成符合ES5的JavaScript。

  • You write TypeScript or CoffeeScript then the transpiler transforms it into ES5 JavaScript.

    你写打字稿或咖啡稿,然后传送者把它转换成ES5 JavaScript。

#4


40  

Technically ECMAScript is the language that everyone is using and implementing -- it is the specification created many years ago when Netscape and Microsoft sat down and attempted to standardise the scripting between JavaScript (Netscape's scripting language) and JScript (Microsoft's).

从技术上讲,ECMAScript是每个人都在使用和实现的语言——它是多年前Netscape和Microsoft所创建的规范,并试图在JavaScript (Netscape的脚本语言)和JScript(微软的)之间标准化脚本。

Subsequently all these engines are ostensibly implementing ECMAScript, however JavaScript (the name) now hangs around for both traditional naming reasons, and as a marketing term by Mozilla for their various non-standard extensions (which they want to be able to actually "version")

随后,所有这些引擎表面上都实现了ECMAScript,但是JavaScript(名称)由于传统的命名原因,以及Mozilla对其各种非标准扩展的营销术语(他们希望能够真正实现“版本”)都被挂起了。

#5


27  

JavaScript = ECMAScript + DOM API;

JavaScript = ECMAScript + DOM API;

  • ECMAScript® Language Specification defines all logic for creating and editing objects, arrays, numbers, etc...

    ECMAScript®语言规范定义所有逻辑创建和编辑对象、数组、数字,等等……

  • DOM API makes it possible to communicate with HTML/XML documents (e.g. document.getElementById('id');).

    DOM API使与HTML/XML文档(例如document.getElementById('id');)进行通信成为可能。

History of JavaScript naming:

JavaScript命名的历史:

Mocha ► LiveScript ► JavaScript ► (part of JS resulted in) ECMA-262 ► ECMAScript ► JavaScript (consists of ECMAScript + DOM API)

摩卡►LiveScript JavaScript►►(JS导致的一部分)ecma - 262►ECMAScript►JavaScript(包括ECMAScript + DOM API)

#6


19  

What is ECMAScript i.e. ES?

什么是ECMAScript也就是ES?

ECMAScript is a standard for a scripting language, and the Javascript language is based on the ECMAScript standard.

ECMAScript是脚本语言的标准,Javascript语言基于ECMAScript标准。

Is Javascript exactly the same as ECMAScript?

Javascript和ECMAScript完全一样吗?

  • No, Javascript is not exactly equivalent to ECMAScript.
  • 不,Javascript并不完全等同于ECMAScript。
  • 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.
  • Javascript的核心特性基于ECMAScript标准,但是Javascript也有其他ECMA规范/标准中没有的特性。

JavaScript = ECMAScript + DOM API;

JavaScript = ECMAScript + DOM API;

DOM API like: document.getElementById('id');

DOM API:. getelementbyid(“id”);

Do other languages use the ECMAScript standard?

其他语言使用ECMAScript标准吗?

  • Yes, there are languages other than JavaScript that also implement the ECMAScript Standard as their core.
  • 是的,除了JavaScript之外还有其他语言,它们也实现了ECMAScript标准作为其核心。
  • ActionScript (used by Adobe Flash) and JScript (used by Microsoft) are both languages that implement the ECMAScript standard.
  • ActionScript(由Adobe Flash使用)和JScript(由微软使用)都是实现ECMAScript标准的语言。

Why is it called ECMAScript?

为什么叫ECMAScript?

  • 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.
  • Javascript最初是在Netscape中创建的,他们想要标准化这种语言。因此,他们向欧洲计算机制造商协会(ECMA)提交了标准化语言。
  • But, there were trademark issues with the name Javascript, and the standard became called ECMAScript, which is the name it holds today as well.
  • 但是,Javascript这个名字有商标问题,标准变成了ECMAScript,这也是它今天的名字。
  • Because of trademark issues, Microsoft’s version of the language is called JScript – even though JScript is, at it’s core, the same language as Javascript.
  • 由于商标问题,微软版本的语言被称为JScript——尽管它的核心是与Javascript相同的语言。

< Update: > For those who care about history

<更新:> 给那些关心历史的人

  • 1995: Originally named Mocha and changed to Livescript
  • 1995年:原名摩卡,改名为Livescript
  • 1997: ECMAScript standard is established
  • 1997年:建立了ECMAScript标准。
  • 1999: ES3 comes out and IE5 is all the rage
  • 1999年:ES3问世,IE5风靡一时
  • 2000–2005: XMLHttpRequest, a.k.a. AJAX, gains popularity in app such as Outlook Web Access (2000) and Oddpost (2002), Gmail (2004) and Google Maps (2005).
  • 2000 - 2005: XMLHttpRequest,又称AJAX,在Outlook Web Access(2000)和Oddpost(2002)、Gmail(2004)和谷歌Maps(2005)等应用中越来越流行。
  • 2009: ES5 comes out (this is what most of us use now) with forEach, Object.keys, Object.create (specially for Douglas Crockford), and standard JSON
  • 2009: ES5在forEach对象中出现(这是我们大多数人现在使用的)。钥匙,对象。创建(特别为Douglas Crockford创建)和标准JSON
  • 2015: ES6/ECMAScript2015 comes out; it has mostly syntactic sugar, because people weren’t able to agree on anything more ground breaking (ES7?)
  • 2015:ES6 / ECMAScript2015出来;它主要含有句法上的糖分,因为人们无法就更多的突破达成一致(ES7?)

#7


13  

Various JavaScript versions are implementations of the ECMAScript standard.

各种JavaScript版本都是ECMAScript标准的实现。

#8


10  

i know this is an old post but hopefully this will help someone.

我知道这是一个旧帖子,但希望这能帮助到别人。

In the 1990’s different versions of js started coming out like javascript from netscape, Js script from Microsoft. So ecmascript was introduced as a standard. But ecmascript forms only a part of javascript which specifies its core syntax,types,objects etc. Probably that explains the inconsistent implementations of javascript across diff. browsers

在20世纪90年代,不同版本的js开始出现,比如netscape的javascript,微软的js脚本。所以ecmascript作为标准被引入。但是ecmascript只是javascript的一部分,它指定了javascript的核心语法、类型和对象等

Reference - Wrox(Professional Javascript For Web Developers)

参考- Wrox(Web开发人员的专业Javascript)

#9


9  

In my understanding, ECMAScript is the "Theory" or "Specification", and Javascript is "Practicals" or "Implementation".

在我的理解中,ECMAScript是“理论”或“规范”,而Javascript则是“实践性”或“实现”。

#10


8  

JavaScript is a ECMAScript language.

JavaScript是一种ECMAScript语言。

ECMAScript isn't necessarily JavaScript.

ECMAScript不一定JavaScript。

#11


6  

Existing answers paraphrase the main point quite well.

现有的答案很好地解释了要点。

The main point is that ECMAScript is the bare abstract language, without any domain specific extensions, it's useless in itself. The specification defines only the language and the core objects of it.

主要的一点是,ECMAScript是纯抽象语言,没有任何特定于域的扩展,它本身是无用的。规范只定义语言和它的核心对象。

While JavaScript and ActionScript and other dialects add the domain specific library to it, so you can use it for something meaningful.

而JavaScript、ActionScript和其他方言则向它添加特定于域的库,因此您可以将它用于有意义的事情。

There are many ECMAScript engines, some of them are open source, others are proprietary. You can link them into your program then add your native functions to the global object so your program becomes scriptable. Although most often they are used in browsers.

有很多ECMAScript引擎,有些是开源的,有些是私有的。您可以将它们链接到您的程序中,然后将您的本机函数添加到全局对象中,以便您的程序成为可脚本化的。尽管它们通常在浏览器中使用。

#12


4  

Javascript was the original name, meant to capitalize on the popularity of java. ECMA is the standards body that oversees the standard that was eventually put in place so the names are roughly equivalent.

Javascript是最初的名称,旨在利用java的流行。ECMA是一个标准机构,负责监督最终制定的标准,因此这些名称大致相同。

Implementations have other names, like V8 or Rhino, etc.

实现有其他名称,如V8或Rhino等。

#13


1  

I doubt we'd ever use the word "ECMAScript" if not for the fact that the name "JavaScript" is owned by Sun. For all intents and purposes, the language is JavaScript. You don't go to the bookstore looking for ECMAScript books, do you?

如果不是因为“JavaScript”这个名字是Sun的,我怀疑我们是否会使用“ECMAScript”这个词。实际上,语言是JavaScript。你不会去书店找ECMAScript的书,是吗?

It's a bit too simple to say that "JavaScript" is the implementation. JScript is Microsoft's implementation.

说“JavaScript”是实现,这有点太简单了。JScript是微软的实现。

#14


1  

JavaScript is one branch of languages formed around the ECMAScript standard. I believe ECMA is the European Computer Manufacturers Association, not that this is really relevant or anything.

JavaScript是围绕ECMAScript标准形成的语言分支之一。我相信ECMA是欧洲电脑制造商协会,并不是说它真的相关。

Don't forget another popular language formed around the ECMA Script standard is ActionScript, used in Adobe Flash/Flex.

不要忘记在ECMA脚本标准中形成的另一种流行语言是ActionScript,它在Adobe Flash/Flex中使用。

#15


1  

ECMAScript is a standard for JavaScript, look at these statements from MDN:

ECMAScript是JavaScript标准,参考MDN中的语句:

JavaScript和ECMAScript有什么区别?

JavaScript

JavaScript (JS) is a lightweight interpreted or JIT-compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more about JavaScript.

JavaScript是一种轻量级的解释或jit编译的编程语言,具有一流的函数。虽然它是Web页面的脚本语言,但许多非浏览器环境也使用它,比如node。js、Apache CouchDB和adobeacrobat。JavaScript是一种基于原型、多范式、动态语言,支持面向对象、命令式和声明式(例如函数式编程)风格。阅读更多关于JavaScript。


ECMAScript

The standard for JavaScript is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. On June 17, 2015, ECMA International published the sixth major version of ECMAScript, which is officially called ECMAScript 2015, and was initially referred to as ECMAScript 6 or ES6. Since then, ECMAScript standards are on yearly release cycles. This documentation refers to the latest draft version, which is currently ECMAScript 2018.

JavaScript的标准是ECMAScript。到2012年,所有现代浏览器都完全支持ECMAScript 5.1。旧浏览器至少支持ECMAScript 3。2015年6月17日,ECMA International出版了《ECMAScript第六版》,正式名称为《ECMAScript 2015》,最初被称为《ECMAScript 6》或《ES6》。从那时起,ECMAScript标准每年发布一次。该文档参考了最新的草案版本,目前是2018年的ECMAScript。

For more info, visit here

更多信息,请访问这里

#16


1  

ECMAScript is nothing but a standard or specification defined in order to create different scripting languages and one of them happens to be JavaScript. It has been created with the sole purpose of cross-browser compatibility

ECMAScript只是为创建不同脚本语言而定义的标准或规范,其中之一恰好是JavaScript。它是为了跨浏览器兼容性而创建的

A standard guarantees that if somebody writes a code following the rules of the standard then the code would run fine in a browser(in case of javascript) if the browser implements the same standard.

标准保证,如果有人按照标准的规则编写代码,那么如果浏览器实现了相同的标准,那么代码在浏览器中运行良好(如果是javascript)。

Why do we need a standard?

为什么我们需要一个标准?

When Javascript was first created by Netscape then there was a war going on between all the browser vendors in the market . Microsoft implemented its own version of javascript in internet explorer . Similarly other browser vendors implemented their own versions.

当Netscape最初创建Javascript时,市场上所有浏览器供应商之间都在进行一场战争。微软在internet explorer中实现了自己的javascript版本。类似地,其他浏览器厂商也实现了自己的版本。

All this created a huge problem for the developers.One code ran fine on Netscape but was a total waste on Internet Explorer . To solve cross browser compatibilty Javascript was standardised by ECMA international ; hence the name ECMAscript.

所有这些都给开发人员带来了巨大的问题。一段代码在Netscape上运行良好,但在Internet Explorer上完全是浪费。为解决跨浏览器兼容问题,ECMA international对Javascript进行了标准化;因此ECMAscript的名称。

All browers agreed to implement ECMAscript(though it took a lot of time).

所有的浏览器都同意实现ECMAscript(尽管这花费了很多时间)。

The result is that now the same code runs fine in all browsers.

结果是,现在相同的代码在所有浏览器中运行良好。

The exception is DOM(Document object model) . DOM is still interpreted in different ways in different browsers . However there is good news . Slowly all browsers are adhering to the same DOM standard .

例外是DOM(文档对象模型)。DOM在不同的浏览器中仍然以不同的方式解释。不过也有好消息。慢慢地,所有浏览器都遵循相同的DOM标准。

#17


0  

Here are my findings:

以下是我的发现:

JavaScript: The Definitive Guide, written by David Flanagan provides a very concise explanation:

由David Flanagan撰写的权威指南提供了一个非常简明的解释:

JavaScript was created at Netscape in the early days of the Web, and technically, "JavaScript" is a trademark licensed from Sun Microsystems (now Oracle) used to describe Netscape's (now Mozilla's) implementation of the language. Netscape submitted the language for standardization to ECMA and because of trademark issues, the standardized version of the language was stuck with the awkward name "ECMAScript". For the same trademark reasons, Microsoft's version of the language is formally known as "JScript". In practice, just about everyone calls the language JavaScript.

JavaScript是在早期的网络时代由Netscape创建的,技术上来说,“JavaScript”是一个由Sun微系统(现在的Oracle)授权的商标,用来描述Netscape(现在的Mozilla)的语言实现。Netscape向ECMA提交了该语言的标准化,由于商标问题,该语言的标准化版本被卡在了“ECMAScript”这个尴尬的名字中。出于同样的商标原因,微软的版本被正式称为“JScript”。实际上,几乎每个人都调用JavaScript语言。

A blog post by Microsoft seems to agree with what Flanagan explains by saying..

微软的一篇博客似乎同意弗拉纳根的解释:

ECMAScript is the official name for the JavaScript language we all know and love.

ECMAScript是我们都熟悉并喜欢的JavaScript语言的官方名称。

.. which makes me think all occurrences of JavaScript in this reference post (by Microsoft again) must be replaced by ECMASCript. They actually seem to be careful with using ECMAScript only in this, more recent and more technical documentation page.

. .这让我想到,在这篇参考文章中出现的所有JavaScript必须被ECMASCript取代。实际上,他们似乎只在最近的技术文档页面上使用ECMAScript。

w3schools.com seems to agree with the definitions above:

w3schools.com似乎同意上面的定义:

JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997. ECMA-262 is the official name of the standard. ECMAScript is the official name of the language.

JavaScript是布伦丹·艾赫在1995年发明的,并在1997年成为ECMA标准。ECMA-262是标准的官方名称。ECMAScript是该语言的官方名称。

The key here is: the official name of the language.

这里的关键是:语言的官方名称。

If you check Mozilla 's JavaScript version pages, you will encounter the following statement:

如果您查看Mozilla的JavaScript版本页面,您将看到以下语句:

Deprecated. The explicit versioning and opt-in of language features was Mozilla-specific and are in process of being removed. Firefox 4 was the last version which referred to a JavaScript version (1.8.5). With new ECMA standards, JavaScript language features are now often mentioned with their initial definition in ECMA-262 Editions such as ECMAScript 2015.

弃用。语言特性的显式版本控制和选择是特定于mozilla的,并且正在被移除。Firefox 4是最后一个提到JavaScript版本的版本(1.8.5)。有了新的ECMA标准,JavaScript语言特性现在常常会在ECMA-262版本(如ECMAScript 2015)中被首次定义。

and when you see the recent release notes, you will always see reference to ECMAScript standards, such as:

当您看到最近的发行说明时,您总是会看到对ECMAScript标准的引用,比如:

  • The ES2015 Symbol.toStringTag property has been implemented (bug 1114580).

    ES2015符号。已经实现了toStringTag属性(bug 1114580)。

  • The ES2015 TypedArray.prototype.toString() and TypedArray.prototype.toLocaleString() methods have been implemented (bug 1121938).

    ES2015 TypedArray.prototype.toString()和TypedArray.prototype.toLocaleString()方法已经实现(bug 1121938)。

Mozilla Web Docs also has a page that explains the difference between ECMAScript and JavaScript:

Mozilla Web文档也有一个页面来解释ECMAScript和JavaScript的区别:

However, the umbrella term "JavaScript" as understood in a web browser context contains several very different elements. One of them is the core language (ECMAScript), another is the collection of the Web APIs, including the DOM (Document Object Model).

但是,在web浏览器上下文中理解的统称“JavaScript”包含几个非常不同的元素。其中之一是核心语言(ECMAScript),另一个是Web api的集合,包括DOM(文档对象模型)。

Conclusion

结论

To my understanding, people use the word JavaScript somewhat liberally to refer to the core ECMAScript specification.

在我的理解中,人们使用JavaScript这个词来指代核心的ECMAScript规范。

I would say, all the modern JavaScript implementations (or JavaScript Engines) are in fact ECMAScript implementations. Check the definition of the V8 Engine from Google, for example:

我想说,所有的现代JavaScript实现(或JavaScript引擎)实际上都是ECMAScript实现。检查谷歌中V8引擎的定义,例如:

V8 is Google’s open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google, and in Node.js, among others. It implements ECMAScript as specified in ECMA-262.

V8是谷歌的开源高性能JavaScript引擎,用c++编写,在谷歌Chrome中使用,它是谷歌和Node的开源浏览器。js等等。它实现了ECMAScript,如ECMA-262中所述。

They seem to use the word JavaScript and ECMAScript interchangeably, and I would say it is actually an ECMAScript engine?

它们似乎可以互换使用JavaScript和ECMAScript,我想说它实际上是一个ECMAScript引擎?

So most JavaScript Engines are actually implementing the ECMAScript standard, but instead of calling them ECMAScript engines, they call themselves JavaScript Engines. This answer also supports the way I see the situation.

因此,大多数JavaScript引擎实际上都在实现ECMAScript标准,但是他们没有调用ECMAScript引擎,而是称自己为JavaScript引擎。这个答案也支持了我对形势的看法。