prosta metoda

var total = [0, 1, 2, 3].reduce((a, b)=> a + b,0);
// total == 6
Jolly Jaguar