Skip to content

reverse

Subhajit Sahu edited this page May 3, 2023 · 24 revisions

Reverse the values.

Alternatives: reverse, reverse$.
Similar: repeat, cycle, rotate, reverse.


function reverse(x)
// x: an array
const xarray = require('extra-array');

var x = [1, 2, 3, 4];
xarray.reverse(x);
// → [ 4, 3, 2, 1 ]


References

Clone this wiki locally