Ad
  • Custom User Avatar

    ...and one more thing: the issue with the cropping disappears once you do not modify the original array.
    (I had the same problem, and found this answer much more down here, I thought I repeat it so that others do not have to dig so deep.)

  • Custom User Avatar

    I think it would be nice if the problem description mentioned that the program shouldn't modify the original array...

  • Custom User Avatar

    There is only one test that checks input for changes, I think. What matters is not how often you do it, but the fact that you did it. It's not hard to avoid mutation, you can search about it online.

    JS version isn't broken at all, over 900 users completed it. You provided no real specifics or test cases that prove it is wrong, so I'm closing this, because it's not issue with kata itself, but something wrong in your code.