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.
Typo on my part. I was just checking that
add()
as falsy, but I now I check that it is NaN.I think that test fixtures for this kata are not strict enough. Correct me if I am wrong, but this solution is not checking if the final result is longer than 140, but the entry string, so it might filter out strings that are over 140 characters, but would generate hashtags that are shorter than 140 chars.
Can somebody explain, why add_() should returns undefined when add() returns NaN?
looks nice, but regexps adds magic in simple code)
Thanks, but I think topmost solution is a bit cleaner
Why do you preffer while loops?