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 your question is how to see what is being tested, you can log the input to the console, using
console.log
Don't overwrite the function's argument like that, your function will always return
"found the needle at position 3"
It means your code returns "found the needle at position 6" whereas it should have returned "found the needle at position 3".