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.
What I want is to slice the number off the front of the string so I need to know the length of the number. Adding an empty string to a number converts the number to a string. So (4 + "").length = 1, (13 + "").length = 2, and so on. A number by itself doesn't have a length property.
You're right, the problem only specifies "letters," which is open to interpretation. My solution passes all tests, so perhaps the author did not have foreign letters in mind.
hi! I think this is a very smart solution and I figured this is the one I can understand and internalize. Except for one thing: I see that in the first line where youre slicing the message (message = message.slice((num + "").length) ) you are adding a an empty string to the num character. I see that tests fail without this operation. I was wondering how this is affecting the way the string is sliced? e.g. string.slice should take two parameters, both of them numbers, so what does this empty string change? Thanks in advance.
how about characters from other languages... "4prét2ça" this ASCII, how about unicode