Ad
  • Custom User Avatar

    You modified the original array at the line copyNumbers.splice(indexMin, 1).

    The issue with your solution is that you're mutating the original array, even though the task requires you to avoid this. When you assign copyNumbers = numbers, you're creating a reference to the original array, not a copy. Modifying copyNumbers will therefore also modify numbers.

  • Custom User Avatar

    I meant read these docs: https://docs.codewars.com/training/troubleshooting#post-discourse

    As for the link you asked, try this one

  • Custom User Avatar

    You will not find definitions of "positive" and "non-negative" in JS documentation, because these are not JS concepts, but mathematics. "Mathematically speaking" (at least w.r.t. what is, I believe, the most common interpretation), the set of non-negative numbers and positive numbers are not exactly the same, and they differ very slightly (by one element, to be precise).

  • Custom User Avatar

    Your code is wrong. Read the docs about how to post code in discourse, please.

    non-negative integers is not the same as positive.

  • Custom User Avatar

    There is nothing to fix (well, I restored a sample test in the description, someone messed it up, but that was a sample test too, so you should have seen it), neither in the description nor the tests, and I already explained what that means, bye.

  • Custom User Avatar

    Ignore letter case means a capital letter is the same as its lowercase version. How you handle that, it's up to you. Not a kata issue.

  • Default User Avatar

    in this kata the needle is a string constant, "needle". this is why the function only takes one parameter, the array in which to search.

  • Custom User Avatar

    I don't understand what the problem is. The function accepts array called haystack, isnt this clear enough?

  • Custom User Avatar

    kkkkkkkkkkkk Thats true, but... look at the primitive type, is int, that problem need to pe long. ^^