Ad
  • Custom User Avatar

    In fact the array used in 2d test is the same as in first test. As you spliced array on first test then when 2d tests occurs array is modified.

    ( Description said :

    Create a function named "rotate" that takes an array and returns a new one ...

    It means (implicitly) array arguments should stay uncahnged.
    Hope it helps.

  • Custom User Avatar

    Actually there's no test with [1,2,3,4] as argument. I'm afraid you've modified the array argument before logging it out.