Immediately Invoked Function Expressions
One of the goals of functional programming is to reign in the scope of variables. We want variables to only be accessible in their small, local scope, and only where they’re needed. This reduces the chance of bugs, since we can quickly find all pieces of code that a variable is connected to.
This lesson discusses one way to implement this idea. We’re learning a tool to reign in variable scope and keep variables as localized as possible.