Login
Remember
Register
Ask a Question
How can you get the reference of a caller function inside a function?
0
votes
asked
Oct 19, 2019
in
JavaScript
by
SakshiSharma
How can you get the reference of a caller function inside a function?
caller-reference
reference-of-caller
javascript-function
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 19, 2019
by
rajeshsharma
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
...