Category: Interview Questions
-
closures in JavaScript?
A closure is when a function remembers variables from its outer scope, even after the outer function has finished. Example: Here, inner() remembers count from outer().
A closure is when a function remembers variables from its outer scope, even after the outer function has finished. Example: Here, inner() remembers count from outer().