Hi, I'm Jacob. Enjoying devFlipCards? Buy me a coffee

2. What is IIFE?

IIFE stands for Immediately Invoked Function Expression.

It's an expression, where function is declared in parenthesis and invoked in the same line.

It can be useful for one-time calculations assigned immediately to a variable. Allows you to create closed scope, where variables can share names with outer-scope variables.

const x = 20; const y = 30; const result = (() => x + y)(); // IIFE console.info(result); // 50
Struggling to find common date to meet with your friends? Try our new tool
commondate.xyz