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 didn't see the replies until your comment Andrew, but now that I come back to it I don't see why it would break for long words. I think I saw indexOf and thought charAt or some such thing. I don't know, this looks like it works to me.
Also I don't get the FUD about using regex, they're not slow in general. Some regex can be slow, but one that looks for a single digit is as fast as indexOf.
This comment is hidden because it contains spoiler information about the solution
In this case it not only copies the array so it isn't modified (a best practice) but also handles when n is less than 3. Without it he'd return the whole signature.
It also doesn't "iterate n times".
Too much white space, you have unnecessary indentation!