Skip to content

Instantly share code, notes, and snippets.

@donedgardo
Created February 8, 2017 19:55
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 donedgardo/2c6401e535d539613b06b3caeb8ee5c2 to your computer and use it in GitHub Desktop.
Save donedgardo/2c6401e535d539613b06b3caeb8ee5c2 to your computer and use it in GitHub Desktop.
ES6 Article
Object.assign(target, ...sources)
// Example
var obj = { a: 1 };
var copy = Object.assign({}, obj);
console.log(copy); // { a: 1 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment