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.
This comment is hidden because it contains spoiler information about the solution
Haven't met them before, thank you!
Hello, what does the
=>
mean? Is it kind of an alternative function notation?Thank you, should have looked closer.
Nice solution!
I was also contemplating a switch statement, but the computational overhead is allegedly very severe and simple if statements are preferable. Details: http://stackoverflow.com/a/12259830
Very elegant!
I'd like to keep all excellent answers to my coding questions for future reference.
So far I've been bookmarking the katas themselves. Is there a specific subpage listing all my comments/discussions that I'm not seeing?
So because strings are instances of the String object, object methods can also be iterated using brackets. (I don't suppose such dynamic iteration would work with the dot notation.)
This is a very smart solution, thank you!
This comment is hidden because it contains spoiler information about the solution
Wow, I learned so much from reading just one line of code! :)
Hello,
Earlier I struggled with calling functions dynamically, e.g. getting the function name from a variable. I really like your solution of calling either toUpperCase() or toLowerCase().
What is the significance of the brackets? Are they necessary for calling the String functions, or for returning the letter value somehow?
This use of apply() sounds very handy, thank you!
Hey there,
What is the significance of apply() in your code? As far as I know it is used to manually provide meaning for this in the given scope. Is this how you create an array with 0 as default value?
Thanks