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 fails the second sample test. And that case is explained in the kata's description.
I passed the test but it raises an error can you guys please take a look?
No, they're not. Try putting the two strings like this when debugging your code, the difference becomes evident.
Hi @Murathancakir and welcome to Codewars!
I tried debugging your solution, because the code looked OK to me - it turns out it's a spelling rather than a programming mistake!
Currently you have:
'neddle'
but the correct spelling is'needle'
with 2 e's. Now your code should work.'found the neddle at position 30' should equal 'found the needle at position 30'
I dont know what is the problem they seems same to me