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.
Got it! My mistake was that in function I wrote the array too, which was not needed.
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".
I dont understand why I get this : expected 'found the needle at position 6' to equal 'found the needle at position 3', what is wrong?
Yep! Site outages are always fun.
Works again for me
Yes - I've had this issue with several kata just now, so the site is definitely having some technical issues!
Yes, I'm also getting "unauthorized" on any kata I try at the moment. This seems to be a problem with codewars, not this kata.
I solved this correctly in VS Code. Im getting "unauthorized" when testing on this site and its very odd.
I saw this code on stackoverflow as one possible solution to the problem. It looks like the other two are far more popular. This is still a good way to visualize solving it!