YogeshChauhan . com

What is ECMAScript?

in JavaScript on February 28, 2020

ECMAScript = ES

ECMA stands for European Computer Manufacturer’s Association

It is best known as the language embedded in web browsers but it has also been widely adopted for server and embedded applications. ECMAScript is based on several originating technologies. For example JavaScript from Netscape and JScript from Microsoft. The language was invented by Brendan Eich at Netscape and first appeared in that company's Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0.

ES2016 included support for a new exponentiation operator and adds a new method to Array.prototype called includes. CMAScript 2017 introduced Async Functions, Shared Memory, and Atomics along with smaller language and library enhancements, bug fixes, and editorial updates. Async functions improve the asynchronous programming experience by providing syntax for promise-returning functions.

ECMAScript 2018 introduced support for asynchronous iteration via the AsyncIterator protocol and async generators. It also included four new regular expression features: the dotAll flag, named capture groups, Unicode property escapes, and look-behind assertions. Lastly it included rest parameter and spread operator support for object properties.

The 10th edition introduces a few new built-in functions: flat and flatMap on Array.prototype for flattening arrays, Object.fromEntries for directly turning the return value of Object.entries into a new Object, and trimStart and trimEnd on String.prototype as better-named alternatives to the widely implemented but non-standard String.prototype.trimLeft and trimRight built-ins.

Great Features in EcmaScript 6 and later on

1. Classes: ES6 introduces language support for classes (class keyword), constructors (constructor keyword), and the extend keyword for inheritance.

2. Arrow Functions: Arrow functions provide two features: lexical scoping of the this keyword and less ceremony when defining an anonymous function. Without arrow functions, every function defines a this value.

3. Modules: Modules in ES6 provide a way to load and manage dependencies via the new import and export keywords.

4. Block Scoping: In ES6, you can use the new let keyword to achieve block scoping.

5. Promises: Promises provide a mechanism to handle the results and errors from asynchronous operations as well as improved readability via method chaining and succinct error handling.


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to uninstall Cocoapods from the Mac OS? #4 How to add Read More Read Less Button using JavaScript? #5 How to Use SQL MAX() Function with Dates? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

May 7 How to disable right click and drag and drop of images using jQuery? May 7 How to render Lists in React? May 7 What’s the difference between variables in CSS and SCSS (Sass)? May 7 How to define variables in SCSS (Sass)? May 7 How to show and hide an element on click in React? May 5 Use inline if to make a shorter conditional syntax in React

You might also like these

Check if mixin is being called in a style rule or not in SCSSSCSSHow to add AppRoutingModule in Angular application using command line?AngularWhat does it mean by Continuous Integration, Continuous Delivery and Continuous Deployment?MiscIntroduction to Angular modules Part 2: NgModules and componentsAngularWhat is a Strict Requirement in PHP 7 Function Declarations?PHPHow to Validate User Name, Email Address and URL in PHP?PHP