Back to Developer Roadmap

IIFE

src/data/roadmaps/javascript/content/[email protected]

4.0575 B
Original Source

IIFE

Immediately-Invoked Function Expression is a function that is executed immediately after it is created.

Example

js
// An Async IIFE
( async() => {
    
    const x = 1;
    const y = 9;

    console.log(`Hello, The Answer is ${x+y}`);

})();

Visit the following resources to learn more: