Recursive/JavaScript Calculating the sum of an array numbers