Returns a new list or string with the elements or characters in reverse order.
reverse([1, 2, 3]); //=> [3, 2, 1] reverse([1, 2]); //=> [2, 1] reverse([1]); //=> [1] reverse([]); //=> [] reverse('abc'); //=> 'cba' reverse('ab'); //=> 'ba' reverse('a'); //=> 'a' reverse(''); //=> ''
Generated using TypeDoc
Returns a new list or string with the elements or characters in reverse order.