Pillars of JavaScript 1. Closure

<p>Read the blog, grasp closure&rsquo;s concept, code in the playground for 10 mins, learn and improve.Ask yourself questions and try to answer on your own and seek help.Happy coding!</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:630/1*hoYmwTYovpywB5RDgn73qQ.png" style="height:413px; width:700px" /></p> <p>Pillars of JavaScript:</p> <ol> <li>Closure</li> <li>Prototypal inheritance</li> </ol> <blockquote> <p>Techie: Oh, interesting! What is Closure?&nbsp;</p> <p><em>let&rsquo;s take a closer look at the concept of closure.</em></p> </blockquote> <p>Prerequisite: Understanding Lexical Scope</p> <p><strong>Definition:</strong>&nbsp;Closure is the ability to remember variables that are defined in the outer function even when the parent function has finished its execution.</p> <p>In simpler terms: Closure is the combination of a function and its lexical scope.<br /> Closure = function() + Lexical Scope</p> <p><a href="https://medium.com/@gopinathanselvaraj21/pillars-of-javascript-1-closure-eeac72597ef3">Click Here</a></p>