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.
Your code wasn't returning an array.
You get a similar error with the initial code:
The testing part assumes your function returns an array and tries to sort it, hence the error.
it apparently comes from your code: you're trying to sort an array that, at some point in the executions, isn't actully an array anymore.