• Pushes the elements onto the end of the array and returns a new array.

    Type Parameters

    • T

    Parameters

    • original: T[]

      The original array

    • Rest ...elementN: T[]

      The arguments to be inserted

    Returns T[]

    The result array

    Example

    <pre>
    const original = ['a', 'b'];
    const result = ['a', 'b', 'c', 'd'];
    expect(push(original, 'c', 'd')).to.eql(result);
    </pre>

Generated using TypeDoc