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.
done.
Thank you for these comments! Your reply and solution helped me think about this problem in a completely different way.
'filter' creates a new array + iterates through the total array.
the 'reduce' solution stops when needed and returns a boolean.
Need to improve on instructions text
doesnt this throw error for numbers as params?
Example: greetingForAllFriends(34);
I agree. changing prototype is not a good practise. But using filter method is good.
This comment is hidden because it contains spoiler information about the solution
It looks like your solution might be better :) Did you test its performance somehow? What do you mean by "most efficient in terms of space"?
duuhh! Thanks!
toString() is not required :)
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
I think I struck a good balance. For more complex solutions, I usually add comments to help new-comers, but this kata was simple enough I didn't think it necessary.
The regex flag, 'i', might not be needed.
But the question doesnt explicitly say that it needs case sensitive comparison, although the tests pass without the flag, 'i'.
Loading more items...