Skip to content

Commit 638e11f

Browse files
Update 10-Closures.md
1 parent 393811b commit 638e11f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Notes/10-Closures.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ When functions are returned from another fun, they still maintain their lexical
2323
- When y is returned, not only is the fun returned but the entire closure (fun y + its lexical scope) is returned and put inside z. So when z is used
2424
somewhere else in program, it still remembers var a inside x()
2525

26+
### Uses of Closure
27+
Module Design Pattern, Currying, Functions like once(fun that can be run only once), memoize, maintaining state in async world, setTimeout, iterators...

0 commit comments

Comments
 (0)