omitArrayIndex()function
omitArrayIndex(arr: ImmutableArray<T>, index: number): ImmutableArray<T>
| Param | Type | |
|---|---|---|
arr | ImmutableArray<T> | The array to update. required |
index | number | 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]