How can you get the reference of a caller function inside a function?
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
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