The concept of hoisting in JavaScript

The concept of hoisting in JavaScript

Behind the Scenes, you will see that JavaScript always takes all the declarations first. That’s basically the hosting. Since this is the default behavior in JavaScript. In this article, I will discuss only the hosting specific. Since hosting is the default behavior, all functions in JavaScript are hosted in the Creation phase. That’s why we can actually call…Continue reading The concept of hoisting in JavaScript

Filter

The filter is the same as the map, but if the function applied here returns true, then it will move to the new array, or if the function returns false then that item will not be in the array. Suppose I want to extract only the odd numbers from the following array and place them…Continue reading Filter

Map

The map() method creates a new array with the results of calling a provided function on every element in the calling array Suppose you have an array: var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; Now you want to find the square of each item in this array. So what you…Continue reading Map

Javascript ES6 – Map

Javascript’s ES6 has nothing quite new in our eyes without syntax differences, or syntactic sugar. But this time we will discuss something completely new. Yes this thing has been added to ES6 completely new. It never existed in any previous version of JavaScript. That’s the map Map. Do not mistake this map Mapas a map map. The reason mapis a method. But the map we Mapwill talk…Continue reading Javascript ES6 – Map