```javascript function sum(arr) { return arr.reduce((a, b) => a + b, 0); } ```