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.
I agree with @cbalci and @igandecki. A single loop that iterates the array once is faster than looping the array multiple times.
I agree. This is not a best practice. The instance should be protected from direct modification by declaring it as a variable inside a closure.
Comparing 'for loop' to 'indexOf' is not the correct analysis here. The above solution goes throught the remaining list every time it removes an item. @Igandecki's point is fair. A single pass solution can be more efficent than this one.
Very interesting, I have no idea how this could possibly be true.. I will have to investigate. :)
Thanks!