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.
Where do you see a loop here? Cuz I don't. You probably mean indexing the array but thaht does not cause an enumeration of the array. indexing an Array is pretty much the fastest thing you can do, even faster than accessing a HashMap aka Dictionary by Key or most other data structures.
it is not efficient as it has to loop each and every single item. A switch statement is very efficient, it does not loop through items one by one. It uses dictionary algorithms behind the scene.
And this hard to read as well.
Strive for simplicity.
....this hurts my eyes
Very efficient but not easy to read