Call Stack in Javascript
 Rahul Gupta

Rahul Gupta @therahul_gupta

About: I am Software Engineer

Joined:
Jun 5, 2022

Call Stack in Javascript

Publish Date: Jun 15 '22
5 0

Call Stack is a data structure for javascript interpreters to keep track of function calls in the program. It has two major actions:

Whenever you call a function for its execution, you are pushing it to the stack.
Whenever the execution is completed, the function is popped out of the stack.

`function hungry() {
eatFruits();
}
function eatFruits() {
return "I'm eating fruits";
}

// Invoke the hungry function
hungry(); `

Comments 0 total

    Add comment