• Reverses an array and returns a new array.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array to reverse

    Returns T[]

    A new array that is the reverse of the argument

    Example

    <pre>
    const original = [20, 10];
    const result = [10, 20];
    expect(reverse(original)).to.eql(result);
    </pre>

Generated using TypeDoc