Skip to content

Instantly share code, notes, and snippets.

@jkup
Created October 13, 2016 07:31
Show Gist options
  • Save jkup/b17f028f31494f01061e01216b78fcd6 to your computer and use it in GitHub Desktop.
Save jkup/b17f028f31494f01061e01216b78fcd6 to your computer and use it in GitHub Desktop.
copyWithinEx2
[1, 2, 3, 4, 5, 6, 7, 8].copyWithin(0, 3);
// copies the values from index 3 to the end of the array ( 4, 5, 6, 7, 8 )
// plays them in place on the array starting at 0 ( value 1 )
// returns [4, 5, 6, 7, 8, 6, 7, 8]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment