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.
I ran some performance tests on some of the cases (as well as my own solution). The top solution using reduce() performs the worst. The best solution is the one using modulus to loop through the numbers. I was actually surprised my solution did as well as it did since I used Math.pow() which I know can be expensive.
http://jsperf.com/sum-digits-of-a-number
Is code efficency even matter? No wonder most websites are so slow.