Javascript

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

Javascript

ES6 Proxy

In ES6 a proxy can be created for an object, and the operations of that object can be intercepted.

Javascript

ES6 Promise

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

Javascript

ES6 Data Structures

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

Javascript

ES6 Miscellaneous

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

Javascript

ES6 Function Parameters

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

Javascript

ES6 Destructuring

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

Javascript

ES6 Template Literals

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

Javascript

ES6 Object Literals

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,