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 ?