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
  • 572,313
  • 128
  • 898
  • 1,281
BeingSuman
  • 2,563
  • 7
  • 27
  • 46

0 Answers0