Consider this javascript code:
var bar = function () { alert(\"A\"); } var foo = bar; bar = function () { alert(\"B\"); }; foo();
When runn
Yes that is expected and by design.
Your question is basically: does foo reference bar as a pointer or reference would in another language?
foo
bar
The answer is no: the value of bar at the time of assignment is assigned to foo.