javascript function to add up code example Example: js sum of array [1, 2, 3, 4].reduce((a, b) => a + b, 0) // Output: 10