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.
You would be correct, however I am saying that when I run your code, I don't see this behavior. Are you sure you aren't misreading the logs?
Here is what I see after running your code a few times:
You may be mistaking the log above the "returned... received..." part as the log for the failed test, but it's not. Note that when you print the values of
arr
, your loop prints one value too many (you're printing a value in memory right after the array), which can lead to confusing looking logs.I could not replicate this with your current code, but there is no mistake. Your current code doesn't check the last number of
arr
.