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.
It actually happens IRL. Sometimes I expand
Array.prototype
in a kata ( I missconcatMap
), and then the tests use afor .. in
loop to iterate over someArray
, and I get weird failures.Reminds me to expand prototypes the correct way ( and to bash the kata author for not using a
for .. of
loop :P ).Fire the assistent, know your programming language, and use a real one for rocket science ..
Don't be Jeff. ( Don't be Jim either. )
The creator of the kata figured that input of 0 should return 0... at least that's what I think is happening here. My code worked in tests, but failed on submission until I removed the handling of n == 0. Is a lone zero considered "trailing?" I could not find a definitive answer, so I agree that a single zero should be counted as 1.