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
It's in the wiki. But the voting only takes place before the katas are published: https://github.com/Codewars/codewars.com/wiki/Kata-Beta-Process
A second thought is that it is a bit language dependant as well. Programmers with focus on functional languages are more prone to use recursion. In some cases (like Haskell) I would say that recursion is more natural than looping.
Well, there is a voting procedure that sets the difficulty. My personal opinion is that basic recursion can absolutely be expected of a 5 kyu kata.
Also, it's solvable without recursion, even if it requires a bit more code.
The easiest way is to just log the values to the console. ( JavaScript.) In this kata, you only return
true
orfalse
, so whatever you return from a failing test is supposed to be negated.Good luck! :-)
Test your factorial function with zero as input. You have an infinite loop there. Fix it and you'll be ok.
You're misunderstanding what to do, you only need to calculate the factorials of one digit numbers (of every digit of the passed input number) and add them. Read the instructions (and see the examples) again.