Don’t tell me the moon is shining; show me the glint of light on broken glass.
Inner function preserve the scope chain of the enclosing function at the time the enclosing function was executed, and thus can access the enclosing function’s variable.
The inner function had preserved the value of b=10 when the outer() function was executed, and continued to preserve(Closure) it.
Value of b=10 is preserved in the Closure even after the outer() function completes its execution.
Thanks to read
Thank you so much to be here and just to read my blog post. If you really love this post. Kindly share it with your friend's circle.
If you've really like my above post then, please share it to on below media