---
name: "BIS_fnc_removeIndex"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_removeIndex
revid: 323162
updated: 2022-07-01T10:34:55Z
---

# BIS_fnc_removeIndex

*Function · Arrays · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Takes an array, and returns a new array with the specified index(es) removed.
This takes the array passed in the first parameter, and returns an array that has the index number in the second parameter removed.
If a third parameter is passed, then a range of indexes will be removed.
Alternatively, an array of indices to remove can be passed in the second parameter.

> [!NOTE]
> **Arma 3:** Use [deleteAt](../commands/deleteAt.md) or [deleteRange](../commands/deleteRange.md) instead.

## Syntax

### Syntax 1

```sqf
[array, startIndex, endIndex] call BIS_fnc_removeIndex
```

**Parameters:**

- `array`: [Array](../topics/Array.md)
- `startIndex`: [Number](../topics/Number.md) - start index to be removed, if [#Parameter 3](../functions/BIS_fnc_removeIndex.md#parameter-3) is not provided, only this index is removed
- `endIndex`: [Number](../topics/Number.md) - (Optional, default [Nothing](../topics/Nothing.md)) -  end index, if provided the indexs from startIndex to endIndex will be removed

**Returns:** [Array](../topics/Array.md) - new array with new values

### Syntax 2

```sqf
[array, indices] call BIS_fnc_removeIndex
```

**Parameters:**

- `array`: [Array](../topics/Array.md)
- `indices`: [Array](../topics/Array.md) of [Number](../topics/Number.md)s - indices to be removed

**Returns:** [Array](../topics/Array.md) - new array with new values

## Examples

### Example 1

```sqf
private _array = [0,1,2,3,4];
[array, 0] call BIS_fnc_removeIndex; // returns [1,2,3,4]
```

### Example 2

```sqf
private _array = [0,1,2,3,4];
[_array, 0, 4] call BIS_fnc_removeIndex; // returns []
```

### Example 3

```sqf
private _array = [0,1,2,3,4];
[_array, [0,4]] call BIS_fnc_removeIndex; // returns [1,2,3]
```

## See also

[deleteAt](../commands/deleteAt.md) · [deleteRange](../commands/deleteRange.md)

<sub>Source: [BI Community Wiki — BIS fnc removeIndex](https://community.bistudio.com/wiki/BIS_fnc_removeIndex) (revision 323162).</sub>
