search
HomeWeb Front-endJS TutorialLet's take a look at the differences between ECMAScript and JavaScript

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
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete
From Websites to Apps: The Diverse Applications of JavaScriptFrom Websites to Apps: The Diverse Applications of JavaScriptApr 22, 2025 am 12:02 AM

JavaScript is widely used in websites, mobile applications, desktop applications and server-side programming. 1) In website development, JavaScript operates DOM together with HTML and CSS to achieve dynamic effects and supports frameworks such as jQuery and React. 2) Through ReactNative and Ionic, JavaScript is used to develop cross-platform mobile applications. 3) The Electron framework enables JavaScript to build desktop applications. 4) Node.js allows JavaScript to run on the server side and supports high concurrent requests.

Python vs. JavaScript: Use Cases and Applications ComparedPython vs. JavaScript: Use Cases and Applications ComparedApr 21, 2025 am 12:01 AM

Python is more suitable for data science and automation, while JavaScript is more suitable for front-end and full-stack development. 1. Python performs well in data science and machine learning, using libraries such as NumPy and Pandas for data processing and modeling. 2. Python is concise and efficient in automation and scripting. 3. JavaScript is indispensable in front-end development and is used to build dynamic web pages and single-page applications. 4. JavaScript plays a role in back-end development through Node.js and supports full-stack development.

The Role of C/C   in JavaScript Interpreters and CompilersThe Role of C/C in JavaScript Interpreters and CompilersApr 20, 2025 am 12:01 AM

C and C play a vital role in the JavaScript engine, mainly used to implement interpreters and JIT compilers. 1) C is used to parse JavaScript source code and generate an abstract syntax tree. 2) C is responsible for generating and executing bytecode. 3) C implements the JIT compiler, optimizes and compiles hot-spot code at runtime, and significantly improves the execution efficiency of JavaScript.

JavaScript in Action: Real-World Examples and ProjectsJavaScript in Action: Real-World Examples and ProjectsApr 19, 2025 am 12:13 AM

JavaScript's application in the real world includes front-end and back-end development. 1) Display front-end applications by building a TODO list application, involving DOM operations and event processing. 2) Build RESTfulAPI through Node.js and Express to demonstrate back-end applications.

JavaScript and the Web: Core Functionality and Use CasesJavaScript and the Web: Core Functionality and Use CasesApr 18, 2025 am 12:19 AM

The main uses of JavaScript in web development include client interaction, form verification and asynchronous communication. 1) Dynamic content update and user interaction through DOM operations; 2) Client verification is carried out before the user submits data to improve the user experience; 3) Refreshless communication with the server is achieved through AJAX technology.

Understanding the JavaScript Engine: Implementation DetailsUnderstanding the JavaScript Engine: Implementation DetailsApr 17, 2025 am 12:05 AM

Understanding how JavaScript engine works internally is important to developers because it helps write more efficient code and understand performance bottlenecks and optimization strategies. 1) The engine's workflow includes three stages: parsing, compiling and execution; 2) During the execution process, the engine will perform dynamic optimization, such as inline cache and hidden classes; 3) Best practices include avoiding global variables, optimizing loops, using const and lets, and avoiding excessive use of closures.

Python vs. JavaScript: The Learning Curve and Ease of UsePython vs. JavaScript: The Learning Curve and Ease of UseApr 16, 2025 am 12:12 AM

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

Python vs. JavaScript: Community, Libraries, and ResourcesPython vs. JavaScript: Community, Libraries, and ResourcesApr 15, 2025 am 12:16 AM

Python and JavaScript have their own advantages and disadvantages in terms of community, libraries and resources. 1) The Python community is friendly and suitable for beginners, but the front-end development resources are not as rich as JavaScript. 2) Python is powerful in data science and machine learning libraries, while JavaScript is better in front-end development libraries and frameworks. 3) Both have rich learning resources, but Python is suitable for starting with official documents, while JavaScript is better with MDNWebDocs. The choice should be based on project needs and personal interests.

See all articles

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

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools