Answers for "how to reverse array of object"

CSS
0

how to reverse array of object

var x = [{"score":1},{"score":2},{"score":3}]
console.log(x);

var y = x.reverse();
console.log(y);

if the above method does not work than try this

var y = [...x].reverse();
console.log(y);
Posted by: Guest on June-18-2021
0

js reverse array of objects

var x = [{"score":1},{"score":2},{"score":3}]
console.log(x);
var y = [...x].reverse();
console.log(y);
Posted by: Guest on July-27-2021

Code answers related to "how to reverse array of object"

Browse Popular Code Answers by Language