omitArrayIndex()function

omitArrayIndex(arr: ImmutableArray<T>, index: number): ImmutableArray<T>
ParamType
arrImmutableArray<T>
The array to update. required
indexnumber
The index to remove. required
Return
ImmutableArray<T>
A new array without index, or the same array if nothing changed.

Return a new array without a specific index in the array (or the same array if the value was unchanged).

Examples

omitArrayIndex([1, 2, 3], 1) // [1, 3]