Ad
  • Custom User Avatar

    Your code fails the second sample test. And that case is explained in the kata's description.

  • Custom User Avatar

    I passed the test but it raises an error can you guys please take a look?

  • Custom User Avatar
                 v
    'found the neddle at position 30' should equal 
    'found the needle at position 30'
                 ^
    

    No, they're not. Try putting the two strings like this when debugging your code, the difference becomes evident.

  • Default User Avatar

    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.

  • Custom User Avatar

    '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