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
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,
Classes are one of the major features of ES6. In fact it wraps prototype based Object Oriented design and provides the developer a better and easier method to write code. It also helps developers who
In ES6, a function can be written in a new way using =>. x/10; myFunc(50); // gives 5 --> This is useful in writing nameless handler functions. It has the same context as the code from which it i
The example below shows how a partial element can be created using handlebars Frameworks:jQuery 1.9.1, Handlebars 4.0.6(update)
The examples below show how a partial can be called in itself. It is useful in creating a dynamic nested menu. Frameworks:jQuery 1.9.1, Handlebars 4.0.6(update) IMPORTANT: As it is recursion, m
The example below shows how custom helpers can be defined for Handlebars. Frameworks:jQuery 1.9.1, Handlebars 4.0.6(update)
Object As we know an object is something that exists and owns a set of properties. The term object is used to refer anything in Javascript. From the list of objects available in Javascript, let us ex