Table of contents
What is Call Stack ?
Call stack is a mechanism for an Interpreter to keep track of its place in script that calls multiple functions - What function is currently being run and what function are called from within that functions
- When we Call a function, The interpreter adds it to the call stack and then starts Carrying out the function
- When function is finished running it's get taken out of call stack and resumes execution where it left off in the last code listing
- Call Stack in Javascript Follows the Last In First Out priniciple.
function calls_stack() {
console.log("hello visiter");
}
function calling_stack(){
console.log("hello Calling Stack");
}
calling_stack();