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 have updated the translation. I updated the casing, but I kept using
gearBox
since the kata description for csharp has it as two words. I added an additional test case to check forif
and?;
. I also updated the description to not mention extension methods for the javascript version and for the return value to benull
instead of-1
.I need an approval for this translation. It's an old kata, but I thought the material matched very well for javascript too.
I don't know if this is clever or a best practice. I just wasn't aware that you could do this with template literals.
Now, as to what is a best practice?
I don't think it is a best practice to support outdated browsers. Not everyone wants or can afford to support everything under the sun. The kata is run on node, and if what you are using supports the option, then it is fair game.
I used to think this kind of code was unreadable before too, but I have gotten used to it. I would however prefer better variable names.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I would only call this super simple if you are well versed in regular expressions. To me, it might as well be in French.
This comment is hidden because it contains spoiler information about the solution
Took me a while to get this answer. While it is very clever, I don't see how this is anywhere close to a best practice.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution