Week 7 Example 9 B Closure
001const outer = function() 002{ 003 let outerFunctionVariable = "A Local variable" 004 const inner = function() 005 { 006 alert(outerFunctionVariable) 007 } 008 window.fnc = inner 009} 010outer(); 011fnc();
This site will be updated live during the sessions
001const outer = function() 002{ 003 let outerFunctionVariable = "A Local variable" 004 const inner = function() 005 { 006 alert(outerFunctionVariable) 007 } 008 window.fnc = inner 009} 010outer(); 011fnc();