Home Web Front-end JS Tutorial Let's take a look at the differences between ECMAScript and JavaScript

Let's take a look at the differences between ECMAScript and JavaScript

Jan 27, 2021 pm 05:50 PM
ecmascript js

Let's take a look at the differences between ECMAScript and JavaScript

Free learning recommendation: js video tutorial

##1. Introduction to ECMAScript

ECMAScript is a script programming language standardized by Ecma International (formerly the European Computer Manufacturers Association, the English name is European Computer Manufacturers Association) through ECMA-262 . This language is widely used on the World Wide Web. It is often called JavaScript or JScript, so it can be understood as a standard for JavaScript, but in fact the latter two are implementations and extensions of the ECMA-262 standard.

1.1 ECMA International

ECMA International is an information and telecommunications standards organization with an international membership system. It is an organization closely connected with enterprises, so the specifications formulated by Ecma International Standards are mainly formulated and promoted by various enterprises. In 1997, the organization released the MCMA-262 standard, which formulated the ECMAScript language specification. This is where ECMAScript comes from.

1.2 ECMA-262 standard (ES standard)

ECMA-262 is a specification standard for scripting languages ​​developed by the ECMA TC39 group. TC39 members are composed of programmers from companies interested in script programming.

The ECMA-262 standard defines the ECMAScript language specification. This standard is also called the ECMAScript Language Specification, or ES specification for short.

The ES specification was released in 1997 and is now the eighth version. ECMAScript is based on several primitive technologies, most notably JavaScript (Netscape Navigator 2.0) and JScript (Microsoft IE3).

1.3 The process of JavaScript standardization

Around 1995: The Internet broke out and Web applications emerged in endlessly. At that time, as long as you registered a .com domain name, you could basically become rich. , just like current blockchain and artificial intelligence. At that time, there were three mainstream versions of JavaScript:

(1) JavaScript in Netscape Navigator 3.0.

(2)JScript in IE.

(3) ScriptEase in CEnvi.

Unlike other programming languages, JavaScript does not have a standard to unify its syntax or features, and these three different versions just highlight this problem. As concerns in the industry increase, it is clear that standardization of this language is imperative.

1997: JavaScript 1.1 is submitted as a draft to the European Computer Manufacturers Association (ECMA). Technical Committee 39 (TC39) was appointed to "standardize the syntax and semantics of a general-purpose, cross-platform, vendor-neutral scripting language." The first version of ECMA-262 was hammered out, which defined a new scripting language called ECMAScript.

1998: The International Organization for Standardization and the International Electrotechnical Commission (ISO/IEC) also adopted ECMAScript as a standard (ISO/IEC-16262). The second version of ECMA-262 (ES2) was released in the same year. The second version basically did not add new features.

2002: ECMA-262 third edition (ES3), newly introduced powerful regular expressions, better string processing, new control statements, try/catch exception handling, stricter Error definitions, formatting of numerical output, and minor changes in anticipation of future language growth. The third version was very widely used at the time, and almost all browsers supported the ES3 standard.

ECMA-262 version 4 (ES4) died prematurely, and some functions were migrated to ES6.

2009: ECMA-262 fifth edition (ES5) is released. Many features have been added based on ES3: including accessor properties, reflective creation and inspection of objects, programmatic control of properties, additional array manipulation functions, support for the JSON object encoding format, and enhanced error checking and program security. strict mode.

2011: Approved as the international standard ISO/IEC 16262:2011. The ES5.1 version was released in the same year (with some upgrades and optimizations to ES5) and was approved by MCMA-262 and ISO/IEC.

2015: ECMA-262 Sixth Edition (ES6 or ES 2015 Language Specification) , ES6 can be said to have begun to precipitate after the release of ES3 in 2000. Due to the death of ES4, Some features in ES4 were not released until ES6, so the sixth version is completely the result of fifteen years of hard work.

ES6Provide better support for large applications, create Lib libraries, and use ECMAScript as a compilation target for other languages. ES6 mainly adds the following features: Major enhancements include modules, class declarations, lexical block scope, iterators and generators, promises for asynchronous programming, destructuring patterns and proper tail calls. The built-in ECMAScript library has been extended to support additional data abstractions, including maps, sets, and binary numeric arrays, as well as the use of strings and regular expressions.

2. Introduction to JavaScript

JavaScript is a literal scripting language. It is a dynamically typed, weakly typed, prototype-based language with built-in support for types. Its interpreter is called the JavaScript engine, which is part of the browser and is widely used in client-side scripting languages. It was first used on HTML (an application under Standard Universal Markup Language) web pages to add dynamic functions to HTML web pages. .

JavaScript is a universal cross-platform scripting language that complies with the ECMA-262 standard (ES standard), in other words, it is a dialect of ECMAScript. In order to gain technical advantages, Microsoft launched JScript, and CEnvi launched ScriptEase, which can also run on the browser like JavaScript. In order to unify specifications, JavaScript is also called ECMAScript because it is compatible with the ECMA standard.

The JavasSript trademark belongs to Oracle because Sun was acquired by Oracle. JavaScript was registered by Sun in the early years and represents the JavaScript language. But the first invention of JavaScript was Netscape. In 1995, it was first designed and implemented on the Netscape Navigator browser by Brendan Eich of Netscape. Because Netscape was working with Sun, Netscape management wanted it to look like Java, hence the name JavaScript. But in fact its grammatical style is closer to Self and Scheme.

2.1 Basic characteristics of JavaScript

JavaScript is a scripting language that belongs to the Internet. It has been widely used in Web application development and is often used to add various functions to web pages. The dynamic function provides users with a smoother and more beautiful browsing effect. Usually JavaScript scripts realize their functions by embedding them in HTML.

(1) An interpreted scripting language (the code is not precompiled).

(2) Mainly used to add interactive behaviors to HTML (an application under the Standard Universal Markup Language) page.

(3) It can be directly embedded in HTML pages, but writing it as a separate JS file is beneficial to the separation of structure and behavior.

(4) Cross-platform feature, with the support of most browsers, it can run on multiple platforms (such as Windows, Linux, Mac, Android, iOS, etc.).

Javascript scripting language, like other languages, has its own basic data types, expressions and arithmetic operators, and the basic program framework of the program. Javascript provides four basic data types and two special data types for processing data and text. Variables provide a place to store information, and expressions can complete more complex information processing.

2.2 JavaScript components

JavaScript consists of three parts: ECMAScript, DOM, and BOM, as shown below.

Lets take a look at the differences between ECMAScript and JavaScript

(1) ECMAScript: Describes the syntax and basic objects of the language.

(2) DOM: Document Object Model (DOM), describing methods and interfaces for processing web content.

(3) BOM: Browser Object Model (BOM), describing the methods and interfaces for interacting with the browser.

2.2.1 DOM Document Object Model

The Document Object Model (DOM for short) is a standard programming for processing extensible markup languages ​​recommended by the W3C organization interface. On a web page, the objects that organize the page (or document) are organized in a tree structure. The standard model used to represent the objects in the document is called DOM. The history of the Document Object Model can be traced back to the "browser war" between Microsoft and Netscape in the late 1990s. In order to compete for life and death in JavaScript and JScript, both parties gave browsers powerful functions on a large scale. Microsoft has added many proprietary things to web technology, including VBScript, ActiveX, and Microsoft's own DHTML format, which makes many web pages unable to display properly using non-Microsoft platforms and browsers. DOM is the masterpiece brewed at that time.

2.2.2 BOM Browser Object Model

BOM (Browser Object Model) is the browser object model. BOM provides objects that interact with browser windows independently of content; since BOM is mainly used to manage communication between windows, its core object is window; BOM consists of a series of related objects, and each object Both provide many methods and attributes; BOM lacks standards. The standardization organization for JavaScript syntax is ECMA, and the standardization organization for DOM is W3C. BOM was originally part of the Netscape browser standard.

Some objects that the browser window interacts with, such as the window object that can move and resize the browser, the location object and history object that can be used for navigation, and the navigator that can obtain browser, operating system, and user screen information. With the screen object, you can use the document as the entrance to access the HTML document, manage the frames object of the frame, etc.

2.3 JavaScript processing engine

The JavaScript processing engine is an interpreter that can parse and run JavaScript code. Browsers usually have JavaScript engines. When JavaScript first came out, it ran in the browser and was used as a client-side language.

Common JavaScript engines:

(1) Chrome V8

(2) Firefox SpiderMonkey

(3) Microsoft Edge Chakra

Mention that Node.js is based on the Chrome V8 engine. As mentioned above, the V8 engine is used to parse and execute JS, and V8 is implemented based on the ECMAScript standard. To put it another way, there are no DOM and BOM operations in Node.js. It only retains the syntax core (ES) of JavaScript and adds an event-driven non-blocking I/O model to make it lightweight and efficient. Node.js runs as a service on Windows, Linux, and Mac, shifting the role of JavaScript from front-end development to back-end development.

The currently somewhat outdated ActionScript for Flash programming is also a specific implementation of ECMAScript.

Related free learning recommendations: javascript learning tutorial

The above is the detailed content of Let's take a look at the differences between ECMAScript and JavaScript. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use JS and Baidu Maps to implement map pan function How to use JS and Baidu Maps to implement map pan function Nov 21, 2023 am 10:00 AM

How to use JS and Baidu Map to implement map pan function Baidu Map is a widely used map service platform, which is often used in web development to display geographical information, positioning and other functions. This article will introduce how to use JS and Baidu Map API to implement the map pan function, and provide specific code examples. 1. Preparation Before using Baidu Map API, you first need to apply for a developer account on Baidu Map Open Platform (http://lbsyun.baidu.com/) and create an application. Creation completed

Recommended: Excellent JS open source face detection and recognition project Recommended: Excellent JS open source face detection and recognition project Apr 03, 2024 am 11:55 AM

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

How to create a stock candlestick chart using PHP and JS How to create a stock candlestick chart using PHP and JS Dec 17, 2023 am 08:08 AM

How to use PHP and JS to create a stock candle chart. A stock candle chart is a common technical analysis graphic in the stock market. It helps investors understand stocks more intuitively by drawing data such as the opening price, closing price, highest price and lowest price of the stock. price fluctuations. This article will teach you how to create stock candle charts using PHP and JS, with specific code examples. 1. Preparation Before starting, we need to prepare the following environment: 1. A server running PHP 2. A browser that supports HTML5 and Canvas 3

Essential tools for stock analysis: Learn the steps to draw candle charts with PHP and JS Essential tools for stock analysis: Learn the steps to draw candle charts with PHP and JS Dec 17, 2023 pm 06:55 PM

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

How to use JS and Baidu Map to implement map click event processing function How to use JS and Baidu Map to implement map click event processing function Nov 21, 2023 am 11:11 AM

Overview of how to use JS and Baidu Maps to implement map click event processing: In web development, it is often necessary to use map functions to display geographical location and geographical information. Click event processing on the map is a commonly used and important part of the map function. This article will introduce how to use JS and Baidu Map API to implement the click event processing function of the map, and give specific code examples. Steps: Import the API file of Baidu Map. First, import the file of Baidu Map API in the HTML file. This can be achieved through the following code:

How to use JS and Baidu Maps to implement map heat map function How to use JS and Baidu Maps to implement map heat map function Nov 21, 2023 am 09:33 AM

How to use JS and Baidu Maps to implement the map heat map function Introduction: With the rapid development of the Internet and mobile devices, maps have become a common application scenario. As a visual display method, heat maps can help us understand the distribution of data more intuitively. This article will introduce how to use JS and Baidu Map API to implement the map heat map function, and provide specific code examples. Preparation work: Before starting, you need to prepare the following items: a Baidu developer account, create an application, and obtain the corresponding AP

PHP and JS Development Tips: Master the Method of Drawing Stock Candle Charts PHP and JS Development Tips: Master the Method of Drawing Stock Candle Charts Dec 18, 2023 pm 03:39 PM

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

How to use JS and Baidu Maps to implement map polygon drawing function How to use JS and Baidu Maps to implement map polygon drawing function Nov 21, 2023 am 10:53 AM

How to use JS and Baidu Maps to implement map polygon drawing function. In modern web development, map applications have become one of the common functions. Drawing polygons on the map can help us mark specific areas for users to view and analyze. This article will introduce how to use JS and Baidu Map API to implement map polygon drawing function, and provide specific code examples. First, we need to introduce Baidu Map API. You can use the following code to import the JavaScript of Baidu Map API in an HTML file

See all articles