Untitled
unknown
plain_text
4 years ago
184 B
4
Indexable
function sum(arr, n) { // Only change code below this line if(n <= 0){ return 0; } else { return sum(arr, n - 1) + arr[n - 1]; } // Only change code above this line }
Editor is loading...
function sum(arr, n) { // Only change code below this line if(n <= 0){ return 0; } else { return sum(arr, n - 1) + arr[n - 1]; } // Only change code above this line }