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
Post a Comment