A Quick Look at Closure in JavaScript
If you write any amount of JavaScript, then you’ll no doubt already be using closure in your code; perhaps without even realising it…
If you write any amount of JavaScript, then you’ll no doubt already be using closure in your code; perhaps without even realising it…
IIFEs or ‘Immediately-Invoked Function Expressions’ (sometimes called Auto-Executing Functions), sound complicated, but they’re actually pretty straightforward to understand.