Intermediate Algorithm Scripting: Sum All Numbers in a Range

My Solution

function sumAll(arr) {
  let sum = 0;
  let sortedArray = [];
  sortedArray = arr.sort(function(a,b) {
    return a > b;
      sum += i;
  return sum;

sumAll([-9, -15]);

Won’t register as correct, even though it produces same results as the answers in “Hints”. Can anyone tell me why?

Your solution passes for me. What browser are you using ? Are you on beta or the live site ? which tests does it fail for exactly ?

Reloaded the page, and it worked. Originally, none of the tests were actually even showing up. Must have been a bug on loading the tests. :smiley:

(Beta Site)

Ty for response <3.