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.
Some people use low-difficulty kata like this one as a way to practice implementing the fundamentals rather than using the standard library methods. :-)
No problem, we've all been :)
Thank you for your answer. I'm quite new as you can see :)
This is how you should read the error logs: "expected YOUR ANSWER to equal THE CORRECT ANSWER". Here it means your function returns
[1,NaN,3]
(an array) while you should have returned a single number (13
). See there for a general help and how to print the input: https://docs.codewars.com/training/troubleshooting/#print-inputGiven that the kata's description says "Only positive integers will be passed to the function (> 0 ), no negatives or zeros". Why do I get this error?
"expected [ 1, NaN, 3 ] to equal 13".
This comment is hidden because it contains spoiler information about the solution