Javascript function call context -


i have situation:

a javascript function a(){} , anotherfunction b(){}.

i call function in 2 modes:

  • as parameter of function b -- b(a());
  • in standalone form -- a();

is there way sense in code when function evaluated parameter , when executed standalone?

is there way sense in code when function evaluated parameter , when executed standalone?

no, because that's not what's happening. following 2 code blocks more or less identical, barring tiny bit of memory var

function implied() {     b(a()); } 

and

function explicit() {     var reta = a();     b(reta); } 

in both cases, a being called parent function, , not b.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -