Created
May 14, 2019 13:36
-
-
Save cyberpirate92/ddd2abf95c6677cc63273aa0c7fc1b45 to your computer and use it in GitHub Desktop.
This file contains 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
// original data | |
x = [1, 2, 3, 4] | |
// making a change | |
x.push(5); | |
// reassign array to change reference | |
x = [...x]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment