Javascript fundamental concept


the Closure is the default behavior of javascript no need to code separately.even the parent function returns the value also child function can access everything from the parent function. have an example below

Immediately Invoked Function Expressions (IIFE)

basically, we need to call the function for use, but if we want to immediately call the function then we can use IFFE, IFFE making process is function must be inside the first bracket, have an example within the array:

Remove duplicate item from an array

Sometimes we see duplicate items in an array. For our work convenience, it is very important to remove duplicate items. It is very simple to remove duplicate items from an array by using for loop. Let’s see an example:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store