Oct 19, 2019 in JavaScript
Q: How can you get the reference of a caller function inside a function?

1 Answer

0 votes
Oct 19, 2019
The arguments object has a callee property, which refers to the function you're inside of. For example −

function func() {

   return arguments.callee;

}

func();                // ==> func

Related questions

0 votes
Mar 20 in JavaScript
0 votes
Oct 19, 2019 in JavaScript
...