It is a common pattern in JavaScript where a function is defined and executed
immediately after its creation. The main purpose of using IIFE is to create a
private scope for variables, preventing them from polluting the global scope.
// Neel.B
(function(data){
console.log(data)
})('Hi this is IIFE')
// Output : Hi this is IIFE
© www.thecoderjob.com. All Rights Reserved. Designed by HTML Codex