JavaScript closures & how closures work?
Java script closures is very important topic for any JavaScript developer.It is widely used in any JavaScript based framework. Closures in JavaScript is an inner function in a outer function, which have access to its outer function scopes. Outer function encapsulating the data, privacy and organization using the closures. A…