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.
You start by cubing every number (n * n * n). Then add the numbers together IF they are odd numbers. Then return the sum of the odd numbers.
so if your numbers are A, B and C:
(A * A * A) = odd1
(B * B * B) = even
(C * C * C) = odd2
Answer would be odd1 + odd2.
Sorry if I've confused things further
Approved! :)
If you check my solution you will realise something is wrong with your code mate :)
Perfect Kata. Very well written description. 11/10
Accepted - Thank you! :)
No problem! I have added a test that equals zero into the test suite now :)
It needs 10 positive votes. (currently at 8) :)
There is a syntax error in the JavaScript example tests
Thanks for the feedback. I have added another test case which equals 0 but I'm not sure if this has solved your issue.
The Kata is meant to be relatively easy and I am happy for both 0 or undefined to work.
Let me know if you have any suggestions.
Thank you!