I’m doing the exercises of the Js Fundamentals, and I found that sometimes my functions are correct (they give the proper answers when I tried them out) but I don’t pass the exercise.
For example, this exercise of the Imaginary friends:
The first function is the correct solution, below is mine. Why is it wrong? It gives always the correct number…