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?