this is a question of modifying array and console.log
Why does console.log output data results that change after him?
let obj = {id: 1};
console.log(obj); //: {obj: 1}
obj.id = 666;
console.log(obj); //: {obj: 666}
Are the objects in the array so special? Faster than the previous code? What exactly is the principle?
in fact, this problem has not been found in many places, mainly because it is not very good at expressing it. Similar can not be found, the answer is generally taught you how to change the array elements of these operations.
but this question about the output modification order has not been found.
however, I see an answer in Stack Overflow
that the modification of the object tree in the array is faster than that of console.log, because it is in English, so the translation may be a little different.
ask all bosses to answer.