Ad
  • Custom User Avatar

    I found the solution, for my case, my counter was initialized outside of the function and I return the value of it when the condition in the question has been met.
    So when the tests runs the function the value of the counter stays the same after you called it for the first time, the test doesn't reset your counter. That's the reason why my kind of recursion doesn't work.

  • Custom User Avatar

    I'm using javascript, recursion function still doesn't work. It's frustrating.