Category:: Javascript

How can I paginate an array of objects in JavaScript?

Depending on your needs sometimes you may wish to create a pagination with an array of items. This post will teach you, paginating an array objects in Javascript. When manually(Without plugins) paginating, you should manually […]

How to Apply CSS Classes Conditionally in Angular 2

Angular 2 provide different ways to apply class to the elements based on certain conditions. In this post I would like to show you couple of ways to conditionally applying class to a DOM element in Angular 2 with ngClass. […]

Exponentiation operator (**) in JavaScript

The exponentiation operator was introduced in ECMAScript 2016, ** is used to denote this operator. It accepts base on its left-hand side and exponent on its right-hand side, respectively. Syntax Prior to exponentiation […]

JavaScript ES6 Destructuring in Depth

Destructuring is alluring language feature, I’ve been using the most. Destructuring is provides a convenient way of extracting multiple values from the objects, Arrays, Map and Set. For better and easy understanding, […]

JavaScript Promise API

Promises can replace the asynchronous use of callbacks, and they provide several benefits over them. Basic Promise Usage A new Promise is created with the new Promise() constructor and the promise provides resolve and […]

JavaScript const keyword

In my previous post I wrote about let keyword, in this post I would like to write about another new ECMAScript 6 keyword, const. There is no much difference between const and let, both works similar way , both are having […]

JavaScript let keyword

In this tutorial I will introduce you to new ECMAScript 6 let keyword. Variables declared with let keyword behave like other languages variables. These variables are unlike to the variables which are declared with var […]

JavaScript measuring execution time

JavaScript performance is becoming increasingly important, it is good to know basic instrumentation techniques. One of the basic instrumentation tool is console.time and console.timeEnd. console.time() starts a new timer […]

Array.from Function

ECMAScript 6 supports a generic Array method for converting an array-like object into one of its own.It is Array.from(). This method is very useful while converting iterable objects to arrays, code will be much cleaner […]

AngularJS – IsArray function

AngularJS isArray() is one of the useful ng function. This function is used to identify if a reference is array or not. This function return Boolean which means , it will return true if the reference is an array, return […]

JavaScript Module Pattern

Design patterns offer developers ways to solve technical problems in a reusable and elegant way. Probably module pattern is the most used and widely accepted JavaScript pattern and you’ve probably used it before […]