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.
This comment is hidden because it contains spoiler information about the solution
Only that you added a potential bug by returning the same array if it's empty. ;)
Check it out: https://www.codewars.com/kata/reviews/59c70207db5fba8af1001a4d/groups/59ddf3eb397858f3d2001013
Thanks again.
I will fix it. Thank you!
A lot of solutions would fail on that test case even the top voted one but nothing was mentioned in description about empty strings and there aren't any random tests.
alextsk's suggestion of using reduceRight is even better.