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.
How is it work?
Where is the cycle?
Checking the last index is a creative idea, but slow since you could be checking the whole string for every character.
This is O(n^2), not best practice.
♥️
no, as strings are immutable in JS
Does this alter the original word?
perhaps the only one too
I'm a big fan of regexp
I really like this solution.
It uses common well known funcitons and still results in short understandable code :)