Created
October 13, 2016 07:31
-
-
Save jkup/b17f028f31494f01061e01216b78fcd6 to your computer and use it in GitHub Desktop.
copyWithinEx2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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