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 😅