when we run the above code, a global execution context (GEC) is created. It is created in two phases:
1)Creation Phase or Memory Creation
2)Code Execution Phase
Now the again above process is repeated with the two phases but for only the add function. After the function is executed completely, the execution context created for that particular function will get deleted automatically.
The GEC is at the bottom of the call stack as it is created at the starting of the program and all the new execution context is pushed on top of it. So when a function's execution gets finished its execution context is also removed from the call stack.
I hope you would have found this article beneficial. Thank you for reading through this article.
Keep Striving for the progress instead of perfection