Hello. Could someone tell me why my code is not working? I don’t understand why it’s not passing these two tests:

sumAll([4, 1]) should return 10

sumAll([10, 5]) should return 45.

```
function sumAll(arr) {
let sorted = arr.sort(function(a,b){
a-b;
});
let newArr = [];
for (let i = sorted[0]; i<=sorted[1]; i++){
newArr.push(i);
}
let sum = 0;
for (let j = 0; j < newArr.length; j++) {
sum += newArr[j];
}
return sum;
}
sumAll([1, 4]);
```