reverse

reverse

Reverses the elements of an array.

const arr = [1, 2, 3, 4];

arr.reverse();
// => [4, 3, 2, 1]

This method modifies the array it is called on.


Backlinks