Returns the last item from an array. Throws an error if the array is empty.
arrayLast(array)
→ returns any
array.last()
Uses the arrayLast function to retrieve the last element of an array
someArray = ["first", "second", "third"];
lastOne=arrayLast(someArray);
writeOutput(lastOne);
Expected Result: "third"
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.