Function InsertIntoArray

  • Inserts elements into an array at the specified index.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The target array.

    • index: number

      The index at which to insert the elements.

    • Rest ...items: T[]

      The elements to insert into the array.

    Returns T[]

    The modified array.

    Throws

    Throws an error if the index is out of bounds.

    Since

    4.2.7

    Version

    2023-11-25

Generated using TypeDoc