Skip to content

Instantly share code, notes, and snippets.

@ianldgs
Created June 5, 2015 12:41
Show Gist options
  • Save ianldgs/aff35c947661e0b689d2 to your computer and use it in GitHub Desktop.
Save ianldgs/aff35c947661e0b689d2 to your computer and use it in GitHub Desktop.
Clone a JavaScript Object
function clone(obj) {
return Object.create({o: obj}).o
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment