Skip to content

Commit 24ef14b

Browse files
committed
Corrected minor mistake in section 4
removing the actual code out of comments
1 parent c0e08a7 commit 24ef14b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ var globalVar = "abc";
137137
"innerArg = " + innerArg + "\n" +
138138
"innerFuncVar = " + innerFuncVar + "\n" +
139139
"globalVar = " + globalVar);
140-
} // end of scope innerFunction)(5); // Pass 5 as parameter
141-
} // end of scope outerFunction )(7); // Pass 7 as parameter
140+
// end of scope innerFunction
141+
})(5); // Pass 5 as parameter
142+
// end of scope outerFunction
143+
})(7); // Pass 7 as parameter
142144
```
143145

144146
`innerFunction` is closure which is defined inside `outerFunction` and has access to all variable which is declared and defined in outerFunction scope. In addition to this function defined inside function as closure has access to variable which is declared in `global namespace`.

0 commit comments

Comments
 (0)