Difference Between JavaScript and ECMAScript
Many people have asked, what is the relationship between JavaScript and ECMAScript? Were there any differences between them before? Today I will give you a detailed explanation of these issues about JavaScript and ECMAScript.
I tried searching on Baidu for "the difference between JavaScript and ECMAScript."
In the end I was completely confused by the massive amount of confusing and conflicting results I got. Desperate:
"ECMAScript is the standard."
"JavaScript is the standard."
"ECMAScript is the specification."
"JavaScript is the ECMAScript standard Implementation. "
##" ECMAScript is standardized JavaScript. "" ECMAScript is a language. "#" JavaScript is a branch of ECMAScript.
"ECMAScript is JavaScript."Hold it, don't cry. I steeled myself and decided to do some painful but fruitful research. This article represents my current understanding of the differences between JavaScript and ECMAScript. This article is for those who are familiar with JavaScript but want to understand more clearly how it relates to ECMAScript, web browsers, Babel, etc. You'll additionally learn about scripting languages, the JavaScript engine, and the JavaScript runtime. So, cheer up. JavaScript/ECMAScript GlossaryThe following is a series of definitions, designed with an emphasis on consistency and clarity. The definition is not percent complete. They are designed to illustrate at a high level the connections and relationships between JavaScript and ECMAScript. Without further ado, let’s get started. Ecma International An organization that sets standards for science and technology. To give a "standard" example (although not invented by Ecma), let's use the keyboard we have used. Does it have most of the letters in the same order, a space bar, an enter key, arrow keys, and the numbers on the top row? This is due to the fact that most keyboard manufacturers base their keyboard designs on the QWERTY layout standard. ECMA-262 This is a standard published by Ecma International. It contains specifications for a general-purpose scripting language. ECMA-262 is a standard similar to QWERTY, but instead of presenting a keyboard layer specification, it presents a specification for a scripting language called ECMAScript. Think of ECMA-262 as the reference number for ECMAScript. Scripting LanguageA programming language designed specifically for operating on an existing entity or system. For a general idea of how a programming language might become a scripting language, consider the commands "walk", "run" and "jump". These actions require something to drive them, maybe a person, a dog, or a video game character. "walk", "run" and "jump" are meaningless without an operator to execute these commands. This set of operations is similar to scripting languages that focus on manipulating external entities.ECMAScript
JavaScript
When people call JavaScript a "dialect of the ECMAScript language," they mean the same thing as when they talk about English, French, or a Chinese dialect. A dialect derives most of its vocabulary and grammar from its native language, but deviates enough to be worth retaining these differences.
Two people may recognize the "jump" command, but one person may respond to the command faster than the other person because he understands and processes the command faster than the other. Similarly, both browsers understand JavaScript code, but one runs faster because its JavaScript engine is implemented more efficiently.
Differences in browser support As another example, there are differences even between people who speak the same language. Even though many people speak English, some may know certain words, expressions, and grammatical rules that others do not, and vice versa. The same goes for browsers. Although all browser JavaScript engines understand JavaScript, some browsers understand JavaScript better than others. This difference exists in browser support for JavaScript.
As for browser support, people usually talk about "ECMAScript compatibility" rather than "JavaScript compatibility", even though the JavaScript engine parses and executes JavaScript. This question is a bit convoluted, and the following table can explain it.
If you remember, ECMAScript is a specification that dictates what a scripting language can look like. Releasing a new ECMAScript version does not mean that all existing JavaScript engines suddenly have these new features. It depends on whether the group or organization responsible for that JavaScript engine wants to update to the latest ECMAScript specification and adopt the changes it brings.
Therefore, developers tend to ask questions like, "Which version of ECMAScript does this browser support?" or "What ECMAScript features does this browser support?" They want to know whether Google, Mozilla and Microsoft have started to update their browsers' JavaScript engines, such as V8, SpiderMonkey and Chakra, to have the latest ECMAScript functionality.
#The ECMASCript compatibility list is a great reference for answers to questions like these.
If a new version of ECMAScript is released, the JavaScript engine will not integrate all the updates at once. They will gradually add ECMAScript functionality, which is evident from Firefox's JavaScript change record:
JavaScript Runtime
The environment in which JavaScript code runs and is interpreted by the JavaScript engine. The runtime provides host objects that JavaScript can run and manipulate.
Synonyms: Host environment JavaScript runtime is the "existing entity or system" mentioned in the scripting language definition. The code is passed through the JavaScript engine, and once parsed and understood, the entity or system will perform the interpreted behavior. A dog walks, a person runs, a video game mission jumps (or causes destruction as in the example above). An application makes itself available to JavaScript scripts by providing a "host object" at runtime. For the client, the JavaScript runtime can be a web browser, in which case host objects such as windows or HTML documents can be used for manipulation. Have you ever used a window or document hosting object? View and document objects are not really part of the core JavaScript language. They are Web APIs, objects provided by the browser that act as a JavaScript hosting environment. For the server side, the JavaScript runtime is Node.js. Server-related hosting objects such as file system, processing, and requests are provided in Node.js. An interesting point is that different JavaScript runtimes can share the same JavaScript engine. V8, for example, is the JavaScript engine used by both Google Chrome and Node.js—two completely different environments.
ECMAScript 6
It is the sixth version of the ECMA-262 standard and features significant changes and improvements to the ECMAScript specification.
Synonyms: ES6, ES2015 and ECMAScript 2015
This version of ECMAScript changed its name from ES6 to ES2015. This is due to Ecma International's decision to release ECMAScript once a year. Accordingly, Ecma International has also begun naming new versions of the ECMAScript specification based on those released each year. In short, ES6 and ES2015 are two different names for the same thing.
Babel
A translator that can convert ES6 code into ES5 code.
Developers can take advantage of the flashy new features in ES6, but worry about cross-browser compatibility for their web applications. At the time of writing this article, Edge and Internet Explorer do not fully support the features in the ES6 specification.
Concerned developers can use Bable to convert ES6 code into a version with the same functionality, but using ES5 features. All major browsers fully support ES5, so they can run your code without worrying about any issues.
An interesting anecdote
I hope this information about JavaScript and ECMAScript is useful to you. Before we wrap up, I want to share a little more information that will enlighten a newbie web developer like me.
Which came first, the chicken or the egg
There is a confusing history about JavaScript because it was developed in 1996. It was then submitted to ECMA International for standardization work in 1997, which led to the birth of ECMAScript. At the same time, since JavaScript is consistent with the ECMAScript specification, it can be said that JavaScript is an example implemented according to ECMAScript.
What is interesting to us is that ECMAScript is based on JavaScript, and JavaScript is based on ECMAScript.
Okay, I know this sounds like a person traveling through time and becoming his or her parents - a bit contradictory, but still pretty funny when I think about it.
Conclusion
I know reading this article has brought you a lot of joy, but the amount of information is still very rich. I have to say goodbye again.
If you have any questions, comments, suggestions or considerations, please let us know.
Thank you very much for reading this article!
Related recommendations:
JavaScript simple return to the top code and comment description
Example of JavaScript implementation of drop-down menu
ECMAScript basic knowledge_javascript skills
The above is the detailed content of Difference Between JavaScript and ECMAScript. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to use WebSocket and JavaScript to implement an online speech recognition system Introduction: With the continuous development of technology, speech recognition technology has become an important part of the field of artificial intelligence. The online speech recognition system based on WebSocket and JavaScript has the characteristics of low latency, real-time and cross-platform, and has become a widely used solution. This article will introduce how to use WebSocket and JavaScript to implement an online speech recognition system.

Face detection and recognition technology is already a relatively mature and widely used technology. Currently, the most widely used Internet application language is JS. Implementing face detection and recognition on the Web front-end has advantages and disadvantages compared to back-end face recognition. Advantages include reducing network interaction and real-time recognition, which greatly shortens user waiting time and improves user experience; disadvantages include: being limited by model size, the accuracy is also limited. How to use js to implement face detection on the web? In order to implement face recognition on the Web, you need to be familiar with related programming languages and technologies, such as JavaScript, HTML, CSS, WebRTC, etc. At the same time, you also need to master relevant computer vision and artificial intelligence technologies. It is worth noting that due to the design of the Web side

WebSocket and JavaScript: Key technologies for realizing real-time monitoring systems Introduction: With the rapid development of Internet technology, real-time monitoring systems have been widely used in various fields. One of the key technologies to achieve real-time monitoring is the combination of WebSocket and JavaScript. This article will introduce the application of WebSocket and JavaScript in real-time monitoring systems, give code examples, and explain their implementation principles in detail. 1. WebSocket technology

Essential tools for stock analysis: Learn the steps to draw candle charts in PHP and JS. Specific code examples are required. With the rapid development of the Internet and technology, stock trading has become one of the important ways for many investors. Stock analysis is an important part of investor decision-making, and candle charts are widely used in technical analysis. Learning how to draw candle charts using PHP and JS will provide investors with more intuitive information to help them make better decisions. A candlestick chart is a technical chart that displays stock prices in the form of candlesticks. It shows the stock price

Introduction to how to use JavaScript and WebSocket to implement a real-time online ordering system: With the popularity of the Internet and the advancement of technology, more and more restaurants have begun to provide online ordering services. In order to implement a real-time online ordering system, we can use JavaScript and WebSocket technology. WebSocket is a full-duplex communication protocol based on the TCP protocol, which can realize real-time two-way communication between the client and the server. In the real-time online ordering system, when the user selects dishes and places an order

How to use WebSocket and JavaScript to implement an online reservation system. In today's digital era, more and more businesses and services need to provide online reservation functions. It is crucial to implement an efficient and real-time online reservation system. This article will introduce how to use WebSocket and JavaScript to implement an online reservation system, and provide specific code examples. 1. What is WebSocket? WebSocket is a full-duplex method on a single TCP connection.

With the rapid development of Internet finance, stock investment has become the choice of more and more people. In stock trading, candle charts are a commonly used technical analysis method. It can show the changing trend of stock prices and help investors make more accurate decisions. This article will introduce the development skills of PHP and JS, lead readers to understand how to draw stock candle charts, and provide specific code examples. 1. Understanding Stock Candle Charts Before introducing how to draw stock candle charts, we first need to understand what a candle chart is. Candlestick charts were developed by the Japanese

JavaScript and WebSocket: Building an efficient real-time weather forecast system Introduction: Today, the accuracy of weather forecasts is of great significance to daily life and decision-making. As technology develops, we can provide more accurate and reliable weather forecasts by obtaining weather data in real time. In this article, we will learn how to use JavaScript and WebSocket technology to build an efficient real-time weather forecast system. This article will demonstrate the implementation process through specific code examples. We
