Ad
  • Custom User Avatar

    I'm not really sure what you mean in your description, @piece. The .reverse() method should reverse the items in that same array, and return that same array. It's all done in place, and then this is returned, to allow method chaining (eg. [1, 2, 3].reverse().push(4)).

  • Custom User Avatar

    I was close to doing exactly this, but ended up doing two loops because I was frustrated with the sense the problem didn't make...

  • Custom User Avatar

    I noticed that in my solution I can log the variable "Test" and get a number (2) back if reverse method was called. However for the fourth test it logs the number BUT wants the original array. Can someone please help me see what I'm missing here? I don't understand why a reverse method would be called just to not be reversed.

  • Custom User Avatar

    This was an interesting problem. I did not expect to solve it in under 5 minutes LOL.