---
name: "BIS_fnc_arrayPop"
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_arrayPop
revid: 327524
updated: 2022-07-12T22:31:42Z
---

# BIS_fnc_arrayPop

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

## Description

This function removes the last (rightmost) element of an array and returns it.

**The array is passed by reference** so changes inside the function will be reflected outside of it.

## Syntax

```sqf
array call BIS_fnc_arrayPop
```

**Parameters:**

- `array`: [Array](../topics/Array.md)

**Returns:** [Anything](../topics/Anything.md) - the removed array element

## Examples

### Example 1

```sqf
private _array = [1,2,3,4];
_removedElement = _array call BIS_fnc_arrayPop; // _array is now [1,2,3] and _removedElement = 4
```

## See also

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

<sub>Source: [BI Community Wiki — BIS fnc arrayPop](https://community.bistudio.com/wiki/BIS_fnc_arrayPop) (revision 327524).</sub>
