The reduce and reduceRight methods follow a common operation called __________

Phạm Quyết

New member
The reduce and reduceRight methods follow a common operation called __________
A. filter and fold
B. inject and fold
C. finger and fold
D. fold
 
Answer: b
Explanation: The reduceRight() method reduces the array to a single value. The reduceRight() method executes a provided function for each value of the array (from right-to-left). The return value of the function is stored in an accumulator (result/total). Hence it does the operation of injecting and folding.
 

Tìm kiếm

Back
Top