Tell us what’s happening:
Describe your issue in detail here.
I cannot pass this exercise. I did it correctly, and even copy pasting the solution, even though the same, will not pass the test. Is this a bug?
**Your code so far**
function sum(arr, n) {
// Only change code below this line
function sum(arr, n) {
if(n <= 0) {
return 0;
} else {
return sum(arr, n - 1) + arr[n - 1];
}
}
// Only change code above this line
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 Edg/92.0.902.73
The code I typed was identical to the solution, that is why I tried copy and pasting to make sure I didn’t have a typo somewhere.
On second examination however, I completely missed that part of the code (above the //only change code below this line, and below //only change code above this line) was already written in and I ended up typing the function name again.