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 was looking at MDN but couldn't fully understand, now I see that the point is that this method adds these characters to those obtained with the slice method. which of course doesn't work if string length = targetLength. Sorry for the stupid question :)
This comment is hidden because it contains spoiler information about the solution
Best solution! I hope one day I will understand regexp so that I can write equally elegant solutions.
came to the same decision about this kata, I think it's the best.