• Removes the last element

    Type Parameters

    • T

    Parameters

    • array: T[]

    Returns T[]

    A new array with the last element removed

    Example

    <pre>
    const original = ["a", "b"];
    const result = ["a"];
    expect(remove(original, 1)).to.eql(result);
    </pre>

Generated using TypeDoc