New recurrence solution using recursion for the challenge below. Please add to hint section

I have a new solution using recursion.

function sumAll(arr) {
  const [a,b] = arr;
  if (a === b)
    return a;
  else if(a > b) 
    return a + sumAll([a-1, b])
  else 
    return a + sumAll([a+1, b])
}

sumAll([1, 4]);