I saw there were no negative numbers so I threw in a tweaked formula, what do you think?

```
function sumAll(arr) {
var greater = Math.max(arr[0], arr[1] );
var smaller = Math.min(arr[0], arr[1]);
return (greater*(greater+1)/2) - (smaller*(smaller-1)/2);
/**
(arr[1]*(arr[1]+1)/2) - (arr[0]*(arr[0]-1)/2);
*/
}
sumAll([1, 4]);
```