Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/07164cfb91feeef0fa1392ee349e95e7 to your computer and use it in GitHub Desktop.
Save trycf/07164cfb91feeef0fa1392ee349e95e7 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
aNumbers = [5,8,7,3,9,12,47,95];
// arrayAvg() => Calculates the average of the values in an array
result = aNumbers.avg();
// arraySum() => Calculates the sum of all the elements in an array.
// result = ArraySum(aNumbers);
//result = aNumbers.sum();
// arrayMax() => Finds the maximum value of the elements in an array.
// result = ArrayMax(aNumbers);
//result = aNumbers.max();
// arrayMin() => Finds the minimum value of the elements in an array.
// result = ArrayMin(aNumbers);
//result = aNumbers.min();
//writedump(result);
// arrayToList() => Converts a one-dimensional array to a list.
// lBands = arrayToList(aBands);
lBands = aBands.toList();
writeDump(lBands);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment