{"name":"BIS_fnc_arrayPop","title":"BIS fnc arrayPop","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_arrayPop","revid":327524,"updated":"2022-07-12T22:31:42Z","groups":["Arrays"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"This function removes the last (rightmost) element of an array and returns it.\n**The array is passed by reference** so changes inside the function will be reflected outside of it.","syntaxes":[{"syntax":"array call BIS_fnc_arrayPop","params":[{"name":"array","type":"Array","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything","description":"the removed array element"}}],"examples":[{"code":["private _array = [1,2,3,4];\n_removedElement = _array call BIS_fnc_arrayPop; // _array is now [1,2,3] and _removedElement = 4"]}],"see_also":["deleteAt","resize"]}