IIFEs (Immediately Invoked Function Expressions) were a key JavaScript pattern before modern language features existed. This post explains what IIFEs are, why they were used for scoping and aliasing in the absence of block scope, and how ES6+ features like `let`/`const`, modules, and top-level `await` have largely made them
Sort: