Skip to content

reverse$

Subhajit Sahu edited this page Feb 2, 2021 · 16 revisions

Reverses the array. 🏃 📼 📦 🌔 📒

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


array.reverse$(x);
// x: an array (updated)
// --> x
const array = require('extra-array');

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

x;
// [ 4, 3, 2, 1 ]


References

Clone this wiki locally