This function iterates over every element of the array and calls the closure to work on that element. It will reduce the array to a single value, from the right to the left, and return it.
NOTE:This function is not available in Lucee 5.x or lower. Potentially use reverse()
instead.
arrayReduceRight(array, function(result, item [,index, [array]]){} [, initialValue])
→ returns any
someArray.reduceRight(function(result, item [,index, [array]]){} [, initialValue])
result
*
any
:
The result of the reduce operation after the previous iteration.
item
*
any
:
The value for the current iteration's item.
index
*
numeric
:
The current index for the iteration
array
*
array
:
A reference of the original array
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.