Let's say we have the following code
var array = [1,2,3,4];
console.log(array);
array.pop();
array.pop();
console.log(array);
Output:
[1,2]
[1,2]
Why are the 2 console.log()
identical, and how come does the 1st one shows the result that was calculated after it's calling?
Is console.log()
function 'delayed' somehow or by something?
PS: I'm using Sencha Touch 2.2.1 Framework, but has far has I know, they ain't overriding console.log(). I'm running this code on safari (latest version);