In Chrome 39 developer tools, this code:
var something = [
{x: 'foo'},
{x: 'foo'}
];
console.log(something);
something.forEach(function (element) {
element['x'] = 'baz';
});
... outputs:
Why does console.log
output modified values even before they have been modified?
A similar question from 2012 explains that due to a chromium bug, console.log
is "delayed" (does not stringify the input object immediately). But the bug is marked as fixed, so why is this still happening several years later?