The Call Stack and Debugging - lucasjwilber/seattle-301d52 GitHub Wiki

The call stack is the list of function calls that are being run and haven't resolved yet. It can be thought of as the interpreter's to-do list. Every time a function calls another function the stack gets bigger, because as the interpreter starts going through the next function it has to keep the previous one in memory so that it can come back to it. It is called a call stack because it has a stack data structure. With a stack of cards, the only card you can remove from the stack is the one on top (the last one added). The call stack behaves the same way: only the last function added to the stack is removed, until the stack is empty.