How can you get the reference of a caller function inside a function?

1 Answer(s)

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
Supporter Answered on August 15, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.