It's frustrating since the new update

Tell us what’s happening:
I don’t know WHY it keeps telling me this “You should use recursion to solve this problem” when i run the tests for my solution.

Your code so far


function sum(arr, n) {
// Only change code below this line
if (n <= 0) {
  return arr[0];
} else {
  return sum(arr, n-1) + arr[n];
}
// Only change code above this line
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0.

Challenge: Replace Loops using Recursion

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion

Hello!

It doesn’t work on Firefox, I don’t know why (a bug, I suppose). I used opera to pass it.

2 Likes

Thankss! It actually worked, I am happy i’m not the only one that faced this little bug. I should be more open to use other browser alternatives from time to time and not just for stupid bugs like this that happen, it doesn’t need to be all perfect but for not be dependent just on a single one you know:))

1 Like

Happy to help :slight_smile:!

By the way, You’re totally right to use different browsers when You have problems, specially if You would like to be a front end developer, because different browsers may have different implementations of JavaScript (EcmaScript).

1 Like

It looks like this bug has been reported and a fix is in review

2 Likes

A fix for this has reached the production platform, please check. Happy contributing.

2 Likes