Immediately Invoked Function Expression(IIFE) is an anonymous function which gets invoked immediately. It is anonymous because it does not have a function name. The nature of this kind of function are self invoking.
Below are some related questions to IIFE.
1.What is Name Collision?
2.Normal Function vs IIFE?
- At the time we create normal function we can have name collision but incase of IIFE we don't face this problem.
3.What is the use of IIFE?
- To not have a name collision is the use of IIFE.
Arrow Function:
Arrow function allows us to shorten the syntax of function as compared to normal function.
No comments:
Post a Comment