1var arr = [34, 234, 567, 4];
2print(arr);
3var new_arr = arr.reverse();
4print(new_arr);
5
1var x = [{"score":1},{"score":2},{"score":3}]
2console.log(x);
3var y = [...x].reverse();
4console.log(y);
5
1var x = [{"score":1},{"score":2},{"score":3}]
2console.log(x);
3
4var y = x.reverse();
5console.log(y);
6
7if the above method does not work than try this
8
9var y = [...x].reverse();
10console.log(y);