reduceRight() method reduces the array to a single value by executing a provided function for each value of the array (from right-to-left).
Note: This method does not alter the original array.
|function(accumulator, currentValue, currentIndex, arr)||Required||Function to execute on each element in the array, taking four arguments.|
accumulator - The accumulator accumulates the callback's return value i.e.) The initialValue, or the previously returned value of the function. Required.
currentValue - Specifies the current element being processed in the array. Required.
currentIndex - Specifies the index of the current element being processed in the array. Optional.
arr - Specifies the whole array. Optional.
|initialValue||Optional||Specifies a value against which each element in an array is tested.|
Please do google search for:
Join Our Channel
This channel is primarily useful for Full Stack Web Developer.