Parameter
Gets the last element from an array.
The last array element.
ArrayLast(array)
ColdFusion (2018 release): Added this function.
Parameter |
Req/Opt |
Description |
---|---|---|
Array |
Required |
The input array from which the last element is to be displayed. |
<cfscript> animals = ['cat','dog','fish','bison']; lastAnimal=ArrayLast(animals); writeOutput("The last element of the array is: " & lastAnimal); // returns "bison" </cfscript>
Sign in to your account