As the title says, I'd like to reverse an array made of objects in Javascript.
Example : var x = [{"score":1},{"score":2},{"score":3}]
To do so, I'm using the .reverse() method.
Now, let's say I write this code
console.log(x);
x.reverse();
console.log(x);
I'm expecting the console to show the array in the original order, then in a reversed order. However, It really shows both arrays in the reversed order.
How come ?