Possible duplicate:
Is the Chrome JavaScript console lazy about evaluating arrays?
For this anonymous function, I have a different result, and it depends on whether I use the Chrome developer console or Firefox Firebug. Why is this?
(function(){ var t =["one","two"]; console.log(t) function a(m){ t[2]="three"; console.log(t) };a(t) function b(n){ t[3]="four"; console.log(t) };b(t) }()) ["one", "two", "three", "four"] ["one", "two", "three", "four"] ["one", "two", "three", "four"]
source share