r/javaScriptStudyGroup • u/Volv • Feb 08 '16
Closures
One thing I've always noticed about Closures is that it seems to me really hard to find examples that have any kind of immediate practical use.
So I decided to give such a thing a go. Focusing on avoiding redeclaration of a variable
Closure Example
Hopefully it makes sense.
4
Upvotes
2
Feb 15 '16
Great example. Thanks for sharing! I have been working on closures this week a lot, and this reassures me that what I am learning is right.
0
1
u/ForScale Feb 11 '16
Cool! Thanks for that!
One thing that I still struggle with is promises... Do you have any really basic examples of a js promise in action?