function OuterFunction() { var outerVariable = 100; function InnerFunction() { alert(outerVariable); } return InnerFunction; } var innerFunc = OuterFunction();