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.
4 months old and I concur concur. I also used sort not realizing how inefficient it is. Thanks for the learning.
Your comment is 2 years old but I concur.
I'm just starting, and my solution was just like this one above.
But excellent point! Seeing your thought make me think a lot different about somethings.
Three years old comment, but really helpful!
Amen!
Nice code!
this made me laugh
Always amazing when I complete a Kata and see a much simpler version. Reminder of how little I know.
This is insane, I love this approach. I was trying to wrap my brain around it for a while. Let me make sure I understand this correctly. When the functions execution context is reached, it then gets executed due to the IIFE ( Immediately Invoked Function Expression ) passing in the Number object's prototype allowing for these functions to be available for any number object? - Brilliant
Using filter or forEach, while more succinct, is less efficient for this sort of thing, since these functions will continue until the entire array has been iterated, whereas a normal loop (or functions like every/some) can be broken as soon as an element is found that does not meet the criteria.
This comment is hidden because it contains spoiler information about the solution
Didn't know about filter! Thanks!
Nevermind. I see the kata has an error within the tests regarding, JS and CoffeeScript.
Works fine when submitting.
This comment is hidden because it contains spoiler information about the solution
I think I will set this one aside for now. I am at work (none coding job) and I want to be able to take my time with this one.
I think this is awesome! You practically built an entire utility for this one line of code solution! I give you a +1 for this!