Removes the last element from an array and returns the removed element. This will cause an exception on an empty array.
arrayPop(array)
returns any
array.pop()
Name | Type | Required | Default | Description |
---|---|---|---|---|
array | array | Yes | The array whose last element is removed. |
This is the full function version of arrayPop to remove the last value of an array.
arr=[1,2,42];
p=arrayPop(array=arr);
writeOutput(p);
Using the member function. This version also works in ACF2018.
arr=[1,2,42];
p=arr.pop();
writeOutput(p);