So heres my take on the IIFE . We will first begin with understanding what really is IIFE, some simple examples of IIFE and what are the benefits it provides to a Javascript developer (Us!!!). Then we will look into some more advanced topics related to IIFE. What is IIFE? IIFE is Immediately Invoked Function Expression. In simple words these are the functions which are called immediately once they have declared. Commonly they are written like this: 1: (function () { // open IIFE 2: console.log("inside IIFE") 3: }()); // close IIFE This code, when executed will print "inside IIFE". Kindly note the syntax. The trailing parenthesis are the ones which do the magic of invoking this function immediately. If we remove the trailing parenthesis, then this code becomes just a normal function definition and nothing else. Also, dont miss the trailing semicolon, its required. Missing the trailing semicolon could cause some serious problems. For e.g. consi...
This is my personal blog for the things that i do at work. I will post the interesting stuff that i do at my day to day work. It can work as a revision for me on the things that i have done.