Demystifying JavaScript Closures

Mayank Raj
Dec 1, 2019 · 6 min read

JavaScript as a language is easy to get started with but difficult to master. This is partly owing to the fact that you can get up and running with a fairly complex application built with JS and not know in detail the workings of it and somewhat because once you have a functional system there is not much motivation to go back and break it down. Hoisting, Lexical Scopes, Closures, this and even IIFFE are not well understood by…