DEV Community

Discussion on: Understanding Closures

srikanth597 profile image

Question about popping off from stack.
So from your post I understood it as parent function gets popped off from the call stack even before it's child starts its Execution Context ?.
I thought parent should be popped whenever child completed its flow then child is cleared from stack then followed by Parent. Because in this way it makes some sense how it should be working.
But from what I red from your point of view is parent is popped well before the child starts even though Closure is holding the parent data .

Aside all of this , It's good post I red most of your posts one after another this were excellent