, , .
, , , , console.log(). , :
console.log(result.data);
result.data.reverse();
console.log(result.data);
You will see the same result twice. The second line changes the array in place, so both log outputs show the same array in its current state.
To demonstrate the behavior of this console, you can do the following:
var b = { a: [1, 2, 3] };
console.log(b);
b.a[1] = 9;
console.log(b);
what you see is what b.ais [1, 9, 3]on both outputs of the console.
source
share