How "reduce" works in JS?

Open original