What Is JavaScript IIFE?

Immediately-invoked Function Expression (IIFE)

Aiman Rahmat
JavaScript in Plain English
3 min readJan 30, 2020

--

Photo by Fabrizio Verrecchia on Unsplash

IIFE stands for Immediately-invoked Function Expression. It’s a JavaScript function that runs as soon as it’s defined. It has no name and is not stored in a variable.

These are commonly seen in libraries where the entire code base is wrapped inside of an IFFE. This prevents variables within the library from…

--

--