Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Gotcha! I'm still very new. Thank you for explaining why I was having issues.

  • Custom User Avatar

    I console.logged(arr, toReturn) in the test and copy/pasted the array so I do not believe I mutated the array.

  • Custom User Avatar

    One of the random tests is flawed when finding the index position. I ended up resubmitting a few times till it passed. Once it passed I copied the first top three code to "train again" to see what I missed and all three of those failed the one random tests as well.

    console.log(min([-366,21,116,120,140,162,175,194,219,223,243,254,347,365,393,402,408,411,440,473,474,477,551,597,602,633,640,651,669,709,740,743,761,781,784,799,805,827,881,885,908,911,928,939,945,949,958,964,965,975 ], 'index'), 13) The tests wants index 13, but the smallest number is clearly -366 which is at index 0.

    Am I missing something with this kata?

  • Custom User Avatar

    How many reverse a string kata's are in codewars...?