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.
fixed for JS. issue is open for Ruby. Closing this one.
This comment is hidden because it contains spoiler information about the solution
Considering the fact there're multiple methods for finding the first element index in JS, asking for a particular one is a not very good idea :(
It seems the problem is that you're using method X, and not method Y. Use the method which simply finds the first occurence, and does not accept a callback as an argument.
Hint: If your solution contains an explicit
for
loop anywhere then you're not solving this Kata properly. There is a very direct built-in method in JS arrays for finding the index of an element in an array.