Table of Contents
1. The relationship between ECMAScript and JavaScript
2. The relationship between ES6 and ECMAScript 2015
3. Approval process for grammar proposals
4. History of ECMAScript " >4. History of ECMAScript
6.Babel transcoder" >6.Babel transcoder
Home Web Front-end JS Tutorial What is ECMAScript6?

What is ECMAScript6?

Jun 23, 2017 am 09:33 AM
Introduction

ECMAScript 6.0 (hereinafter referred to as ES6) is the next generation standard of the JavaScript language and was officially released in June 2015. Its goal is to enable the JavaScript language to be used to write complex large-scale applications and become an enterprise-level development language.


1. The relationship between ECMAScript and JavaScript


A common question is, ECMAScript What's the relationship with JavaScript?

To clarify this issue, we need to review history. In November 1996, Netscape, the creator of JavaScript, decided to submit JavaScript to ECMA, the international standardization organization, hoping that this language could become an international standard. The following year, ECMA released the first version of Standard Document No. 262 (ECMA-262), which stipulated the standard for browser scripting language and called this language ECMAScript. This version is version 1.0.

This standard has been developed for the JavaScript language from the beginning, but there are two reasons why it is not called JavaScript. One is trademark. Java is a trademark of Sun. According to the licensing agreement, only Netscape can legally use the name JavaScript, and JavaScript itself has been registered as a trademark by Netscape. Second, I want to show that the developer of this language is ECMA, not Netscape, which will help ensure the openness and neutrality of this language.

Therefore, the relationship between ECMAScript and JavaScript is that the former is a specification of the latter, and the latter is an implementation of the former (other ECMAScript dialects include Jscript and ActionScript). In everyday situations, these two words are interchangeable.


2. The relationship between ES6 and ECMAScript 2015


The word ECMAScript 2015 (referred to as ES2015) is also often seen. How does it relate to ES6?

In 2011, after ECMAScript version 5.1 was released, the development of version 6.0 began. Therefore, the original meaning of the word ES6 refers to the next version of the JavaScript language.

However, because this version introduces too many grammatical features, and during the formulation process, many organizations and individuals continue to submit new features. It quickly became clear that it would not be possible to include all the features that would be introduced in one release. The conventional approach is to release version 6.0 first, then version 6.1 after a while, then version 6.2, version 6.3 and so on.

However, the standard setters did not want to do this. They want to make standard upgrades a regular process: anyone, at any time, can submit proposals for new syntax to the standards committee, which then meets monthly to evaluate whether the proposals are acceptable and what improvements are needed. If after many meetings, a proposal is mature enough, it can officially enter the standard. This means that standard version upgrades become a rolling process, with changes every month.

The Standards Committee finally decided that the standard would be officially released in June every year as the official version of that year. In the following time, changes will be made based on this version. Until June of the next year, the draft will naturally become the new year's version. This way, the previous version number is not needed, just the year stamp.

The first version of ES6 was released in June 2015, and its official name is "ECMAScript 2015 Standard" (ES2015 for short). In June 2016, the slightly revised "ECMAScript 2016 Standard" (ES2016 for short) was released as scheduled. This version can be regarded as the ES6.1 version, because the difference between the two is very small (only the includes of array instances are added method and exponentiation operator), basically the same standard. According to the plan, the ES2017 standard will be released in June 2017.

Therefore, ES6 is both a historical term and a general term. It means the next generation standard of JavaScript after version 5.1, covering ES2015, ES2016, ES2017, etc., while ES2015 is the official name, specifically referring to The official version of the language standard released that year. When ES6 is mentioned in this book, it usually refers to the ES2015 standard, but sometimes it also refers to the "next generation JavaScript language" in general.


3. Approval process for grammar proposals


Anyone can submit a proposal to the Standards Committee (also known as the TC39 Committee) Proposal to revise language standards.

A new grammar needs to go through five stages from being a proposal to becoming a formal standard. Changes at each stage require approval by the TC39 committee.

  • Stage 0 - Strawman (presentation stage)

  • Stage 1 - Proposal (comment solicitation stage)

  • Stage 2 - Draft

  • Stage 3 - Candidate

  • Stage 4 - Finished Stage)

As long as a proposal can enter Stage 2, it will almost certainly be included in future formal standards. All current proposals for ECMAScript can be viewed at TC39’s official website Github.com/tc39/ecma262.

One of the writing goals of this book is to track the latest progress of the ECMAScript language and introduce all new syntax after version 5.1. New syntaxes that are clearly or promisingly destined for inclusion in the standard will be introduced.


4. History of ECMAScript


ES6 from the beginning to the end It took 15 years for it to be released.

As mentioned earlier, ECMAScript 1.0 was released in 1997. In the next two years, ECMAScript 2.0 (June 1998) and ECMAScript 3.0 (December 1999) were released continuously. Version 3.0 was a huge success. It was widely supported in the industry and became a common standard. It established the basic syntax of the JavaScript language and is fully inherited by subsequent versions. To this day, when beginners start learning JavaScript, they are actually learning version 3.0 syntax.

In 2000, ECMAScript 4.0 began to be brewed. This version ultimately failed, but most of its content was inherited by ES6. Therefore, the starting point for the formulation of ES6 is actually 2000.

Why didn’t ES4 pass? Because this version was too radical and a complete upgrade to ES3, some members of the standards committee were unwilling to accept it. ECMA's Technical Committee 39 (TC39) is responsible for formulating the ECMAScript standard, and its members include major companies such as Microsoft, Mozilla, and Google.

In October 2007, the draft version 4.0 of ECMAScript was released, and the official version was originally expected to be released in August of the following year. However, there are serious differences between the parties on whether to adopt this standard. Large companies, led by Yahoo, Microsoft, and Google, oppose major upgrades to JavaScript and advocate minor changes; Mozilla, headed by JavaScript creator Brendan Eich, insists on the current draft.

In July 2008, due to the great differences between the parties and the fierce debate on which functions should be included in the next version, ECMA decided to suspend the development of ECMAScript 4.0 and remove some of the aspects related to the improvement of existing functions. A small part was released as ECMAScript 3.1, while other radical ideas were expanded and put into later versions. Due to the atmosphere of the conference, the project codename of this version was Harmony. Shortly after the meeting, ECMAScript 3.1 was renamed ECMAScript 5.

In December 2009, ECMAScript version 5.0 was officially released. The Harmony project was divided into two. Some more feasible ideas were named JavaScript.next and continued to be developed, and later evolved into ECMAScript 6; some less mature ideas were regarded as JavaScript.next.next and will be developed in the further future. Consider launching again. The overall consideration of the TC39 committee is that ES5 will remain basically compatible with ES3, and major syntax corrections and new features will be completed by JavaScript.next. At that time, JavaScript.next referred to ES6, and after the sixth version was released, it referred to ES7. TC39’s judgment is that ES5 will become the mainstream standard for JavaScript development in mid-2013 and will maintain this position for the next five years.

In June 2011, ECMAscript version 5.1 was released and became an ISO international standard (ISO/IEC 16262:2011).

In March 2013, the ECMAScript 6 draft was frozen and no new features will be added. New functionality is envisioned to be put into ECMAScript 7.

In December 2013, the ECMAScript 6 draft was released. This will then be followed by a 12-month discussion period to hear feedback from all parties.

In June 2015, ECMAScript 6 was officially adopted and became an international standard. Counting from 2000, 15 years have passed.


6.Babel transcoder


Babel is a widely used ES6 transcoder The coder can convert ES6 code into ES5 code so that it can be executed in the existing environment. This means that you can write programs in ES6 without worrying about whether your existing environment supports it. The following is an example

1 // 转码前2 input.map(item => item + 1);3 4 // 转码后5 input.map(function (item) {6   return item + 1;7 });
Copy after login

The original code above uses arrow functions. Babel converts it into a normal function, which can be executed in a JavaScript environment that does not support arrow functions.

The above is the detailed content of What is ECMAScript6?. 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)

Python ORM Performance Benchmark: Comparing Different ORM Frameworks Python ORM Performance Benchmark: Comparing Different ORM Frameworks Mar 18, 2024 am 09:10 AM

Object-relational mapping (ORM) frameworks play a vital role in python development, they simplify data access and management by building a bridge between object and relational databases. In order to evaluate the performance of different ORM frameworks, this article will benchmark against the following popular frameworks: sqlAlchemyPeeweeDjangoORMPonyORMTortoiseORM Test Method The benchmarking uses a SQLite database containing 1 million records. The test performed the following operations on the database: Insert: Insert 10,000 new records into the table Read: Read all records in the table Update: Update a single field for all records in the table Delete: Delete all records in the table Each operation

Introduction to Yii Framework: Understand the core concepts of Yii Introduction to Yii Framework: Understand the core concepts of Yii Jun 21, 2023 am 09:39 AM

The Yii framework is a high-performance, highly scalable, and highly maintainable PHP development framework that is highly efficient and reliable when developing Web applications. The main advantage of the Yii framework is its unique features and development methods, while also integrating many practical tools and functions. The core concept of the Yii framework, the MVC pattern, Yii adopts the MVC (Model-View-Controller) pattern, which is a pattern that divides the application into three independent parts, namely the business logic processing model and the user interface presentation model.

Application of Python ORM in big data projects Application of Python ORM in big data projects Mar 18, 2024 am 09:19 AM

Object-relational mapping (ORM) is a programming technology that allows developers to use object programming languages ​​to manipulate databases without writing SQL queries directly. ORM tools in python (such as SQLAlchemy, Peewee, and DjangoORM) simplify database interaction for big data projects. Advantages Code Simplicity: ORM eliminates the need to write lengthy SQL queries, which improves code simplicity and readability. Data abstraction: ORM provides an abstraction layer that isolates application code from database implementation details, improving flexibility. Performance optimization: ORMs often use caching and batch operations to optimize database queries, thereby improving performance. Portability: ORM allows developers to

Get an in-depth understanding of 7 commonly used Java design patterns Get an in-depth understanding of 7 commonly used Java design patterns Dec 23, 2023 pm 01:01 PM

Understanding Java Design Patterns: An introduction to 7 commonly used design patterns, specific code examples are required. Java design patterns are a universal solution to software design problems. It provides a set of widely accepted design ideas and codes of conduct. Design patterns help us better organize and plan the code structure, making the code more maintainable, readable and scalable. In this article, we will introduce 7 commonly used design patterns in Java and provide corresponding code examples. Singleton Patte

Implement efficient data persistence using Python ORM Implement efficient data persistence using Python ORM Mar 18, 2024 am 09:25 AM

Object-relational mapping (ORM) is a technology that allows building a bridge between object-oriented programming languages ​​and relational databases. Using pythonORM can significantly simplify data persistence operations, thereby improving application development efficiency and maintainability. Advantages Using PythonORM has the following advantages: Reduce boilerplate code: ORM automatically generates sql queries, thereby avoiding writing a lot of boilerplate code. Simplify database interaction: ORM provides a unified interface for interacting with the database, simplifying data operations. Improve security: ORM uses parameterized queries, which can prevent security vulnerabilities such as SQL injection. Promote data consistency: ORM ensures synchronization between objects and databases and maintains data consistency. Choose ORM to have

Add GUI charm to your projects with Python Tkinter Add GUI charm to your projects with Python Tkinter Mar 24, 2024 am 09:46 AM

Tkinter is a powerful library for creating graphical user interfaces (GUIs) in python. It is known for its simplicity, cross-platform compatibility, and seamless integration with the Python ecosystem. By using Tkinter, you can add a user-friendly interface to your project, improving user experience and simplifying interaction with your application. Creating a Tkinter GUI application To create a GUI application using Tkinter, perform the following steps: Import the Tkinter library: importtkinterastk Create the Tkinter main window: root=tk.Tk() Configure the main window: Set the window title, size, position, etc. Add GUI elements: Using Tki

From Novice to Master: A Crash Course in Java Git From Novice to Master: A Crash Course in Java Git Mar 27, 2024 pm 10:41 PM

Git is a distributed version control system that helps teams collaborate on software development. For Java developers, understanding Git is crucial because it provides a platform for managing code changes, tracking code history, and collaborating with others. Install Git for newbies (understand the basics): Install Git software and set environment variables. Create repository: Use gitinit to create a local repository. Add files: Use gitadd to add files to the staging area. Commit changes: Use gitcommit to commit changes in the staging area to the local repository. Intermediate (collaboration and version control) cloning a repository: Use gitclone to clone a local copy from a remote repository. Branching and Merging: Use branches to create isolated copies of your code

Python vs. Jython: Who is the king of cross-platform development? Python vs. Jython: Who is the king of cross-platform development? Mar 22, 2024 pm 12:21 PM

Both python and Jython are popular programming languages, but they are optimized for different use cases and have unique advantages and disadvantages when it comes to cross-platform development. Python Advantages: Extensive libraries and community support Easy to learn and use, suitable for beginners Highly portable, can run across multiple platforms Supports multiple programming paradigms, including object-oriented, functional and imperative programming Disadvantages: Lower performance, Not suitable for processing intensive computing tasks High memory consumption May require additional tools and configuration on some platforms Jython Advantages: Fully compatible with Python, can use all Python libraries and tools Run on the Java Virtual Machine (JVM), providing Seamless integration with the Java ecosystem performs better than Py

See all articles