JavaScript Learning Notes: Arrays


                    //Immediately Invoked Function Expression (IIFE)
                    (function chai(){
                        // named IIFE
                        console.log(`DB CONNECTED`);
                    })();
                    
                    ( (name) => {
                        console.log(`DB CONNECTED TWO ${name}`);
                    } )('hitesh')
                    

                

If we use two Immediately Invoked Function Expression in single file then we have to put Semi-colon ;in frst one.

Console Output:
DB CONNECTED DB CONNECTED TWO hitesh