Whatever message this page gives is out now! Go check it out!
ListReduceRight(list, callback, initialValue, [delimiter, includeEmptyFields])Parameter | Required/Optional | Description |
array | Required | The input array. |
callback | 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. |
delimiter | Optional | The list delimiter. The type is string. |
includeEmptyFields | Optional | (Boolean) Include empty values. |
<cfscript>
myList="2021, ColdFusion ";
closure=function(value1,value2){
return (value1&value2);
}
writeOutput(ListReduce(myList,closure,""));
writeoutput("<br>")
writeOutput(ListReduceRight(myList,closure,""));
</cfscript><cfscript>
myList="2021, ColdFusion ";
closure=function(value1,value2){
return (value1&value2);
}
writeOutput(myList.ReduceRight(closure,""));
</cfscript>