Home » Javascript

Hidden power of javascript object

An object is an awesome data structure in JavaScript. Why it’s awesome? Just because of its store data as key and value pair and every key is unique so we can store unique information inside objects. So one…

Read More »

Ninja secret of javascript array

power of array

Primitive variable just stores one value. A lot of time it’s very difficult to manage multiple variables so avoid this problem we need storage to store multiple elements inside one variable. So basically javascript array is an ordered…

Read More »

Power of javascript closure


It is a advance concept of javascript. This is really interesting concept in javascript. So basically it is a function inside function which can access outer function properties. According to MDN “A closure is the combination of a…

Read More »

Javascript ninja secrets


It’s all about javascript cool tips and tricks which help day to day programming and reduce the time of the developer. For more tricks you can also read Tips and Tricks. 1. Use == instead of === ==…

Read More »

Regular expressions


It is a powerful way of searching and replacing something inside a string. To implement that we can use RegExp class and integrated with strings. In Regular expressions we need pattern and optional flags. So we have 2…

Read More »

Javascript for…of loop


Lot of powerful loops in javascript but for-of is a new loop in ES6 that replaces both for-in and forEach() and supports the new iteration protocol. Use it to loop over iterable objects (Arrays, strings, Maps, Sets, etc.;…

Read More »

Template strings


String Interpolation String Interpolation is the way by which we can insert variable into string. In Javascript We have two type for String Interpolation. 1. Traditional 2. ES6 1. Traditional Way In traditional Javascript, string always encolsed within…

Read More »



Destructuring Destructuring is a way to quickly extract data out of an {} or [] without having to write much code. ES5 Way let foo = [‘x’, ‘y’, ‘z’]; let a = foo[0]; let b = foo[1]; let…

Read More »

Javascript basic algorithms

js algorithms

If you are working javascript then you need to understand these basic algorithm because these algorithm are very useful in your daily programming life. Get uniq from array // get uniq from array const nums = [1, 2,…

Read More »

JSON, n JSON method


The JSON (JavaScript Object Notation) is a general format to represent values and objects. JSON is the string form of object. Syntax: JSON.stringify(value[, replacer[, space]]) Parameters: Value The value to convert to a JSON string. Replacer Optional The…

Read More »