Calculates the Median value of items in an array. All elements in the array must contain values that can be converted to numeric.
arrayMedian(array)
→ returns numeric
array.median()
Uses the arrayMedian function to calculates the Median value
someArray = [1,2,2];
m=arrayMedian(someArray);
writeOutput(m);
Expected Result: 2
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.