Array.reverse()
Reverse the order of items in an array.
let count = [1, 2, 3, 4, 5];
// Reverse the array order
count.reverse();
// logs [5, 4, 3, 2, 1]
console.log(count);
Reverse the order of items in an array.
let count = [1, 2, 3, 4, 5];
// Reverse the array order
count.reverse();
// logs [5, 4, 3, 2, 1]
console.log(count);