Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
oh its supposed to be recursive
KHINKS: your code is wrong, read troubleshooting page and print the input, see why your code fails and fix it.
You are doing something wrong, because tests are ok in JS. Maybe you are misreading the log, I don't know, your message is not clear to me. I strongly advice you to read the documentation, where you can find some helpful tips: https://docs.codewars.com/training/troubleshooting/
JavaScript: the returns of the function are always correct, as well as the data type of the return.
For example, 111 returns 3, 10 returns 1, 15 returns 6, etc.
Although, for some reason, only the 'Test' ends succesfully, while the 'Attempt' fails, saying that whatever number should return the other number and the return of the my function is the same as it is demanded to be, but it fails the attempt.