• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in JavaScript by
Q:
How can you get the reference of a caller function inside a function?

1 Answer

0 votes
by
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
asked Mar 20, 2021 in JavaScript by sharadyadav1986
0 votes
asked Oct 19, 2019 in JavaScript by SakshiSharma
...