JavaScript Closures
You need to know how the lexical scoping works first to understand the closures.
Lexical scoping
Lexical scoping defines the scope of a variable by the position of that variable declared in the source code. For example:
let name = 'Ravindra';
functi...
ravindrapv.hashnode.dev2 min read