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.
You're correct. The other comments bring up tail recursion, which would deal with this issue, but they conveniently leave out the fact that almost no JavaScript runtime actually supports it.
likewise
I always google if I don't cknow what one or enother method from others' solution means!
That's great practise!
By using the char codes? (I came up with a very similar solution)
This comment is hidden because it contains spoiler information about the solution
Separating the comparison so far from the rest of the ternary operator isn't very readable. I wouldn't consider this best practices.
I agree, and additionally, the wording of the kata is so unclear that if I didn't already know what reduce does, I would have had no idea what the problem is actually supposed to be.
This leads me to wonder if a better answer would also break words separated by  
Agreed! This is similar to other solutions but if you just made the string include the entire lower and uppercase alphabet twice, you could refactor the method to easily take in an argument about how far to rotate. :)
I personally think this should be the top answer. It offers flexibility, readability, conciseness, and it maintains encoding independance.
I would recommend against encoding-specific solutions for any portable language, but especially for JS.
This comment is hidden because it contains spoiler information about the solution
We want to keep trying until we reach the end case, where we have a single digit. We use recursion to make that happen.
Thank you :)
Nope :) However, you can use "let" instead of "var" if you want the variable to only exist in the scope of the loop.
Today I learned JS doesn't terminate the variables declared in for loops if you use var
Loading more items...