javascript get call stack
snippet in javascript

javascript get call stack

user1236

console.trace();

Javascript get caller function

user8185

function alertTheCallersName(){
    var callingFunctionName=alertTheCallersName.caller.name; //get the callers name here
    alert(callingFunctionName);
}

function someOtherFunction(){
   alertTheCallersName();
}
someOtherFunction();