(arg)
| 1 | function outerFunction(arg) { |
| 2 | var variableInOuterFunction = arg; |
| 3 | |
| 4 | function bar() { |
| 5 | console.log(variableInOuterFunction); // Access a variable from the outer scope |
| 6 | } |
| 7 | |
| 8 | // Call the local function to demonstrate that it has access to arg |
| 9 | bar(); |
| 10 | } |
| 11 | |
| 12 | outerFunction("hello closure"); // logs hello closure! |
| 13 |
no test coverage detected