Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/basarat/typescript-book
/ bar
Function
bar
code/javascript/closure.js:4–6 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
2
function
outerFunction(arg) {
3
var
variableInOuterFunction = arg;
4
function
bar() {
5
console.log(variableInOuterFunction);
6
}
7
bar();
8
}
9
outerFunction(
"hello closure"
);
Callers
1
outerFunction
Function · 0.70
Calls
1
log
Method · 0.45
Tested by
no test coverage detected