Tweakr
    Preparing search index...

    Function removeIndex

    • Removes elements at specified index/indices.

      Type Parameters

      • T

      Parameters

      • array: T[]

        Target array

      • indices: number | number[]

        Index or indices to remove

      Returns T[]

      Filtered array

      removeIndex([1,2,3,4], 1); // [1,3,4]
      removeIndex([1,2,3,4], [0,3]); // [2,3]

      1.2.0