J.P. Morgan Interview Question

Explain the benefits of the reduce method

Interview Answer

Anonymous

Jan 2, 2022

Saves space and time complexity with the ability to not loop through a forEach method and assign the mutated array directly to a new variable.