Closure In Javascript
Closure is one concept in Javascript that can be difficult to grasp at first; this is because Javascript closures are not applied explicitly- they are not created manually like arrays or objects are created. A closure simply happens automatically in ...
kpealecodes.hashnode.dev3 min read
Favourite Jome
Software Engineer @bug0
Well explained Kpeale!
I'll like to add something though, if the parent function having a variable isn't used/declared in the child function, then JS doesn't keep closure of the parent function variables.
P.S That's my understanding though, I might be wrong ๐