Whatever message this page gives is out now! Go check it out!
ArrayReduceRight(array, function(result, item, [,index, array])[, initialValue])Parameter | Required/Optional | Description |
array | Required | The input array. |
function | Required | Closure or a function reference that will be called for each of the iteration. The arguments passed to the callback are
|
initialValue | Optional | Initial value which will be used for the reduce operation. The type is any. |
<cfscript>
data = ['1','2','3','4','5','6'];
stringConcat = ArrayReduceRight(data,function(previous,next) {
return previous & next;
},"");
writeOutput(stringConcat)
</cfscript><cfscript>
data=[3,5,7,9,11]
result=ArrayReduceRight(data,function(previous,next){
return previous & next
},"")
writeDump(result)
</cfscript><cfscript>
data=[3,5,7,9,11]
result=data.ReduceRight(function(previous,next){
return previous & next
},"")
writeDump(result)
</cfscript>