Given the following code:
var tmp = [0];
for(var i=0;i<100;i++) {
tmp[0] = i;
console.log(tmp);
}
I'd expect output of [0], [1], [2], [3], etc
But I instead get [99], [99], [99], [99], etc
Stepping through the code in a debugger (firebug) however nets me the correct result of [0], [1], [2].
console.logtoalertworks... hmmm (didn't tryconsole.logcause I don't want to enable Firebug.)