Skip to content

Instantly share code, notes, and snippets.

@chardos
Created January 29, 2016 04:44
Show Gist options
  • Save chardos/88e166d9763d7d94a846 to your computer and use it in GitHub Desktop.
Save chardos/88e166d9763d7d94a846 to your computer and use it in GitHub Desktop.
//deep copy
var deepCopy = jQuery.extend(true, {}, arr);
//deep copy an array of objects
var originalArr = JSON.parse(JSON.stringify(this.state.labels)) //deep copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment