Describe your issue in detail here. What is the problem why isn’t it even returning number.
function sumAll(arr) { sumAll([1, 4]); let i = sumAll[0]; let j = 0; while(i<sumAll[1]){ j+=i; i++; } return j; }
Intermediate Algorithm Scripting - Sum All Numbers in a Range
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
There is an error in your code. Your function is recursively accessing itself. Which is why you are getting the following error: the while loop will run infinitely, adding too many numbers, and exceeding the programs limits.
Please reset the step and try again.
Happy coding