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.