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 dig how concise this is - great use of arrow functions.
I like this solution! It is very readable, at least for me. Your last if statement isn't needed, though - if you move the return -1 outside of the for loop (so it only runs when the loop exits without returning i at any point), you'll get the same functionality.
This comment is hidden because it contains spoiler information about the solution