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.
WTF is "an heartbleed proof" ?!?
Fun kata, but I would add my voice to those calling for a better explanation of that vowel-count index. As a native (American) English speaker, my suggestion would be something like:
Count the vowels in the service name, subtract one from this vowel count, then take the character from this index position in the service name. (Take the first character if there are no vowels.)
Having said that, I must once again commend everyone who communicates so well in English here on Codewars despite not having English as their native language. Coming from a culture that shows far too little respect for foreign languages and foreign cultures, I am very impressed every day here on CW.
Would greatly benefit from wthit56's advice about clarifying the 1-based vowel system.
I have added CoffeeScript translation. Please approve.
In my translation, I have also added some randomized testing. As this is CoffeeScript, you can easily auto-translate it and add to JS as well (use coffeescript.org for automated translation, for example).
The whole
1-based
thing is just really confusing. You could just say that if there are zero or one vowels, the first character should be used, if there are three vowels, the third character should be used, that kind of thing. The coder should be incharge of making sense of that in the code, and one-based just confuses the matter.Nice and simple exercise, though. I would add some random tests too, but nice kata.