When I run the javascript code below:
var dados = Array();
for (var i = 0; i < 2; ++i) {
dados.push({index: i});
console.log(dados);
}
The output in the browser console for the first interaction will be:
[0: {index: 0}, 1: {index: 1}, length: 1]
And for the second interaction it will be:
[0: {index: 0}, 1: {index: 1}, length: 2]
As we can see the 'length' prints correctly according to the interaction, but the Array objects are printed in their entirety. Why does this occur?