0

I have been using JavaScript for quite sometime but this question keeps coming back to me every now and then. Consider the following code snippet :

function dummyFunc(inputFunc){
    return inputFunc();
}

function getNumber{
    return 100;
}

dummyFunc(getNumber);

When am passing getNumber - only the address of function gets passed or entire function declaration gets passed to dummyFunc ?

If this is answered already please let me know ?

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
BeingSuman
  • 3,015
  • 7
  • 30
  • 48

0 Answers0