Dler Ari
1 min readMay 11, 2018

--

The first parameter accumulates the values, and the last parameter is the current value in the array. In this scenario, the array have 7 numbers which means it will execute 6 times (starts on index 1) and moves from left to right while only adding two numbers per execution (callback). Similar concept to bubble-sort, except it sums up values rather sorting. For more details, click here.

--

--

Dler Ari
Dler Ari

Written by Dler Ari

Software Engineer sharing interesting tech topics

Responses (1)