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.
If someone try this solution with more or less fighters, this will fail but I like the ternary operator
With an other Fighters dimention it will fail.as the rows and cols length are hard coded
well done!
This solution will break if we add arrays (rows), or if we add or del names in arrays (rows). But good job)
But the kata says the fighters array will always be the same, so there is no need to support possible addition of new fighters to the fighters array.
Clean solution, but I would swap the 5 out for
(fighters[position[0]].length - 1)
to support if new fighters are ever added to the roster.Mutates input ;-)
Kind of unfamiliar with Javascript. Shouldn't you also avoid changing given parameters?