Search posts, tags, users, and pages
Couldn't understand closures? Let's clear this.
Mansoor Ameen
@mansoorameen
Self-taught coder | Front-end developer
Markdown supported · ⌘↵ to post
Paarth Bajaj
Now if you combine all those functions (not one, but all) with each of their lexical environment, that is called Closure! Explain this in the code please.
Paarth Bajaj Functions form closures. Here each function forms a closure, and that's why they can access var num.
Thank you for answering my stupid doubts! Mansoor Ameen
Paarth Bajaj Glad to be of some help :)
Paarth Bajaj
Now if you combine all those functions (not one, but all) with each of their lexical environment, that is called Closure! Explain this in the code please.