Skip to content

reverse

Subhajit Sahu edited this page May 11, 2020 · 17 revisions

Reverses the values.

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

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

references

Clone this wiki locally