ECMAScript:
ECMA stands for European Computer Manufacture Association. ECMAScript (ES) is a scripting language specification standardized by ECMAScript International in ECMA-262 and ISO/IEC 16262. It was created to standardize JavaScript, so as to foster multiple independent implementations. JavaScript has remained the best-known implementation of ECMAScript since the standard was first published, with other well-known implementations including JScript and ActionScript. Coders commonly use ECMAScript for client-side scripting on the World Wide Web, and it is increasingly being used for writing server applications and services using Node.js. There are eight editions of ECMA-262 published. Present Work on version 8 of the standard was finalized in June 2017. ECMAScript provides the rules, details, and guidelines that a scripting language must observe to be considered ECMAScript compliant.
ECMAScript: A language standardized by ECMA International and overseen by the TC39 committee. This term is usually used to refer to the standard itself. Sun (now Oracle) had a trademark on the name “JavaScript” (Microsoft calling its JavaScript dialect “JScript”). Thus, when it came to standardizing the language, a different name had to be used. Instead, “ECMAScript” was chosen, because the corresponding standard is hosted by Ecma International. In practice, the terms “ECMAScript” and “JavaScript” are interchangeable. If JavaScript means “ECMAScript as implemented by Mozilla and others” then the former is a dialect of the latter. The term “ECMAScript” is also frequently used to denote language versions.
ECMAScript is a collection of built-in objects which round out the definition of ECMAScript entities. These built-in objects include the Global object, the Object, the Function object, the Array object, the String object, the Boolean object, the Number object, the Math object, and the Date object.
ECMAScript also a set of built-in operators which may not be, strictly speaking, functions or methods. ECMAScript operators include various unary operations, multiplicative operators, additive operators, bitwise shift operators, relational operators, equality operators, binary bitwise operators, binary logical operators, assignment operators, and the comma operator.
ECMAScript syntax intentionally resembles Java syntax. ECMAScript syntax is relaxed to enable it to serve as an easy-to-use scripting language. For example, a variable is not required to have its type declared nor are types associated with properties, and defined functions are not required to have their declarations appear textually before calls to them.
ECMA-262: The Ecma International (a standards organization) has created the ECMA-262 standard which is the official specification of the ECMAScript language.
ECMAScript 5 (ES5): The 5th edition of ECMAScript, standardized in 2009. This standard has been implemented fairly completely in all modern browsers.
ECMAScript 6 (ES6)/ ECMAScript 2015 (ES2015): The 6th edition of ECMAScript, standardized in 2015. This update adds significant new syntax for writing complex applications, including classes and modules, but defines them semantically in the same terms as ECMAScript 5 strict mode. Other new features include iterators and for/of loops, Python-style generators and generator expressions, arrow functions, binary data, typed arrays, collections (maps, sets and weak maps), promises, number and math enhancements, reflection, and proxies (metaprogramming for virtual objects and wrappers).
ECMAScript 7(ES7): The 7th edition of ECMAScript 2016, was finalized in June 2016.New features include the exponentiation operator (**), Array. Prototype. includes (not to be confused with ClassList.contains).
ECMAScript 8(ES8): The 8th edition of ECMAScript 2017, was finalized in June 2017.it includes await/async, which works using generators and promises.
ECMAScript 9(ES9): The 9th edition of ECMAScript 2018, was finalized in June 2018. Also Added New features.
ECMAScript 9(ES10): The 10th edition of ECMAScript 2019, was finalized in June 2019. Also Added New features
What is ECMAScript?
ECMAScript, also known as JavaScript, is a programming language adopted by the European Computer Manufacturer’s Association as a standard for performing computations in Web applications. ECMAScript is the official client-side scripting language of VoiceXML. ECMAScript is a limited programming model for simple data manipulation ECMAScript is object-oriented and is considered as a core programming language. It has also become of the most widely used general purpose programming languages. Additionally, it is widely used for embedded and server programming applications but can also be used for any application which needs scripting language.
What is the relationship between JavaScript and ECMAScript?
JavaScript is a scripting language most often used for client-side web development. It was the originating dialect of the ECMAScript standard. ECMAScript and Live Script are other names for JavaScript. The current JavaScript that is supported in browsers is ECMAScript
What is Babel?
Babel is the one of the most popular JavaScript transpiler and becomes the industry standard. It allows us to write ES6 code and convert it back in pre-Es6 JavaScript that browser supports.
What is a Promise?
A promise is an object that may produce a single value sometime in the future: either a resolved value, or a reason that it’s not resolved (a network error occurred). A promise may be in one of 3 possible states (fulfilled, rejected, or pending). Promise users can attach callbacks to handle the fulfilled value or the reason for rejection.
What is Webpack?
Webpack allow you to run an environment that hosts babel. Webpack is open source JavaScript module bundler which takes modules with dependencies and generates static assets representing those modules.
What is Traceur?
Traceur is a JavaScript. Next-to-JavaScript-of-today compiler that allows you to use features from the future today. Traceur supports ES6 as well as some experimental ES.next features.Traceur’s goal is to inform the design of new JavaScript features which are only valuable if they allow you to write better code. Traceur allows you to try out new and proposed language features today, helping you say what you mean in your code while informing the standards process. JavaScript’s evolution needs your input.
What is Reflect API?
Reflect is a built-in object that provides methods for intercept able JavaScript operations. The methods are the same as those of proxy handlers. Reflect is not a function object, so it’s not constructible. Full reflection API exposing the runtime-level meta-operations on objects. This is effectively the inverse of the Proxy API, and allows making calls corresponding to the same meta-operations as the proxy traps. Especially useful for implementing proxies.
What are template literals in Es6?
Template literals are the string with embedded code and variables inside. Template literal allows concatenation and interpolation in much more comprehensive and clear in comparison with prior versions of Ecma script.
What is Destructuring?
Destructuring allows binding using pattern matching, with support for matching arrays and objects. Destructuring is fail-soft, similar to standard object lookup foo [“bar”], producing undefined values when not found.
How to create a JavaScript class in ES6?
In Es6 you can create a class using the Class keyword. Below is sample JavaScript class in ES6.
Class User {
Constructor (name, age) {
this.name = name;
this.age = age;
}
getData () {
console.log (this.name + “is ” + this.age + ” years old !”);
}
}
var user = new User(“foo”, 7);
s1.getData();
What is the ES6 Map feature?
The Map object is a simple key/value map. Any value (both objects and primitive values) may be used as either a key or a value. Syntax [key, value]. e.g.
hash = new Map ()
hash.set (“hello”, 42)
hash.set (1, 34);
console.log (hash); //Map {“hello” => 42, 1 => 34}
What is BabelJS?
BabelJS is the most popular transpiler that transforms new JavaScript ES6 to Old JavaScript ES5.BabelJS makes it possible for writing the next generation of JavaScript today (means ES2017).BabelJS simply takes ES2015 file and transform it into ES5 file. Current browsers versions can now understand the new JavaScript code (ES2017), even if they don’t yet support it.
What are the new features of ES6?
List some new features of E6
- Support for constants (immutable variables)
- Block-Scope support for both variables, contants, functions, Arrow Functions
- Extended Parameter Handling
- Template Literals and Extended Literals
- Enhanced Regular Expression and Enhanced Object Properties
- Destructuring Assignment
- Modules, Classes, Iterators, Generators
- Support for Map/Set & WeakMap/WeakSet
- Promises, Meta-Programming, Internationalization & Localization
What are the new feature of ES7?
ECMAScript 7 is the next evolution of the ECMA-262 standard. Some features are
- Exponentiation Operator
- Array comprehensions and Generator comprehensions
- Async functions and Async generators
- Object Observe and Typed Objects
- Object.getOwnPropertyDescriptors
- Array.prototype.includes
What are the new features of ES8?
ES8 also called ES2017
- Object. Values and Object. Entries
- Object.getOwnPropertyDescriptors
- Superfluous commas in the list of function parameters and calling
- Asynchronous Functions, await
- Paddy String
- SharedArrayBuffer
What are the new features of ES9?
ES9-2018 Edition-ECMAScript 2018
- Rest/Spread Properties
- Asynchronous iterator
- Promise,prototype,finally
- Object expansion operator
- Template string for non escape sequence
And New RegEXp
- Unicode escape
- s/dotAll mode
- Named capture group
- Lookbehind assertions
What are the new features of ES10?
ES10-2019 Edition-ECMAScript 2019
- prototype.(flat, flatmap)
- prototype.(trimStart,trimEnd, matchAll*)
- fromEntries
- prototype.toString
- prototype.description
- Optional catch binding
- JSON superset
- Improvement on Unicode support for JSON.stringify()
- sort now retains order if keys are equal
- BigInt
- globalThis