Created
September 12, 2018 15:40
-
-
Save 1-800-jono/190a03e75f6aecd82a38afb3c0530b26 to your computer and use it in GitHub Desktop.
Deep clone array for immutability
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
const newArray = myArray.map(a => Object.assign({}, a)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment