In this lesson we look at working with Immediately Invoking Function Expressions or IIFEs in JavaScript.  These types of functions execute as soon as they are read and also prevent their contents from being hoisted into the global scope.

Read more in this article from Ben Alman, creator of the term IIFE.  You can also download the project files.