reverse()
reverse<
T
>(arr
):T
[]
Returns a new array with the order of the elements reversed.
Type Parameters
• T
The type of array elements.
Parameters
arr
T
[]
The array to reverse the order of.
Returns
T
[]
Remarks
pure function
Example
import { reverse } from '@accelint/core';
reverse([1, 2, 3, 4, 5]);
// [5, 4, 3, 2, 1]