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.
And I thought I had some unorthodox solution
When operations are able to be chained like this, it's always tempting to reduce the line count of a solution, especially when the potential exists to reduce it to just a single line. When we do that, though, we sacrifice an opportunity to communicate to maintenance developers the significance of intermediate operations.
Here, for example, the significance of the split('') operation is left undisclosed, which is to deduce the "digits" from the original number. Applying the "extract variable" refactor to describe that significance is important in production-quality code.
(I realize "production quality" isn't always the intent of the solutions's author, but my statement is for the benefit of those who might otherwise mistake this solution's "best practice" rating as an indicator of perfection.)