ES6 Symbol
Symbol is a new primitive data type introduced in ES6. It is unique and immutable, and can be created using the function Symbol. It can be used as unique keys in objects. See the example below Gl
Symbol is a new primitive data type introduced in ES6. It is unique and immutable, and can be created using the function Symbol. It can be used as unique keys in objects. See the example below Gl
In ES6 a proxy can be created for an object, and the operations of that object can be intercepted.
Promoise is for asynchronous programming. Javascript is the language for the client side of web and in most of the cases the execution of the program waits for the completion of an asynchronous reques
ES6 adds two useful and efficient data structures, Set and Map. SetSet is a collection of unique values of any type. It can be initialized empty or with an existing list of items. MapMap is key-valu
There are many new keywords in ES6. Some of them are listed below with examples. letThe keyword let can be used to bind variable to a scope. It is different from var because let defines a variable in
In ES6 there are multiple enhancements in defining function parameters - default, rest and spread. DefaultYou can set a default value for a function parameter. RestFirst parameter of a function can
Using this feature values can be assigned to variables by matching patterns in an array or object. This is fail-soft, so if match fails, a variable will be initialized as undefined In the last two ex
In ES5 to create a dynamic string, static string parts have to be concatenated with Javascript variables. ES6 introduces template literals using which manual concatenation can be avoided. See the exam
ES6 enhances the syntax used to initiate an Object. See the example below. Another example that shows how local variables and functions can be easily used in the object literal x)() ]: x * 10,