Call Stack page
Learn how to trace how functions are called.
The problem
What is the name of the function that calls the end
function below?
What you need to know
In the following code, a()
calls b()
, b()
calls c()
, and c()
calls d()
:
By adding a breakpoint in d()
, you will see the following in the Call Stack:
Chrome can also track asynchrounous function calls. In the following code,
setTimeout
is used to call the next function:
By adding a breakpoint in d()
, you will see the following in the Call Stack:
The solution
Click to see the answer
The answer is e
.