IIFE (Immediately Invoked Function Expression)

 Normal syntax of IIFE

πŸ‘‰ First add ( ) to a function then
πŸ‘‰ Declare a empty ( )


πŸ‘‰as Arrow function


When you want to use 2 IIFE then you have to add- ;

✅in the end of function declaration


πŸ“ŒWithout adding in the end of a function declaration otherwise each function don't know where to stop

Let add a parameter to it and call it



πŸ“Œ here I add a parameter called name then call with a argument- "Please"

πŸ˜€ Its a named iife because I give a name to this function  i.e. chai πŸ˜†



Comments

Popular posts from this blog

How function return an Array in JavaScript