To get the largest numeric value of an array
someArray = arrayNew(1);
writeOutput(arrayMax(someArray));
Expected Result: 0
Uses the arrayMax function to get the largest numeric value of an array
someArray = [23,45,87,1,4];
writeOutput(arrayMax(someArray));
Expected Result: 87
CF 11+ Lucee 4.5+
someArray = [23,45,0,1,4];
writeOutput(someArray.max());
Expected Result: 45
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.