Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/arrays/insertAtIndex

Index

Functions

Functions

insertAtIndex

  • insertAtIndex<T>(arrayToInsertInto: T[], valueToInsert: T, indexToInsert: number): T[]
  • Inserts a value to a specific array index

    Type parameters

    • T

    Parameters

    • arrayToInsertInto: T[]

      The array to contain the new value

    • valueToInsert: T

      The value to insert into the array

    • indexToInsert: number

      Array index that this value should be inserted

    Returns T[]

    Array of values with the newly inserted value

Generated using TypeDoc