Ad
  • Custom User Avatar

    This is bad practise in javascript. Functions should not modify arguments they are given or vars outside of themselfs

  • Custom User Avatar

    It is specifically mentioned what the function should return.

    If your changes to the array aren't picked up, realise that an array is passed by reference. Are you changing the reference, or the values it points to?

  • Custom User Avatar

    It should be specifically mentioned that there's no need to return item as an array. Also, despite having the completely correct answer in my array, the kata only seems to pick up the initial value of the array.