A Real time Example of JavaScript closure
<p><strong>Hey ! how are you doing? Today I am going to tell you a closure story. It’s pretty interesting and easy to remember. We all know in JavaScript it’s a very common question asked several times , what is closure? can you give a real time example of that?</strong></p>
<p>In the top picture you can see one lady is buying oranges from a outside trolley. Imagine it’s an outer function where oranges are a variable. That lady brings those oranges to home . Now you think she is inside inner function. Now she wants to have a glass of orange juice . So she cuts few oranges and squash it and pour it in a jar. In this process she is returning a juice served in a glass closure within buying oranges.</p>
<p><a href="https://blog.devgenius.io/a-real-time-example-of-javascript-closure-b10687d66e72"><strong>Click Here</strong></a></p>