Skip to content

Instantly share code, notes, and snippets.

@1-800-jono
Created September 12, 2018 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1-800-jono/190a03e75f6aecd82a38afb3c0530b26 to your computer and use it in GitHub Desktop.
Save 1-800-jono/190a03e75f6aecd82a38afb3c0530b26 to your computer and use it in GitHub Desktop.
Deep clone array for immutability
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