Skip to content

Instantly share code, notes, and snippets.

@bitsmanent
Created October 2, 2016 19:40
Show Gist options
  • Select an option

  • Save bitsmanent/f8b23108b415d774514471bd78c5230f to your computer and use it in GitHub Desktop.

Select an option

Save bitsmanent/f8b23108b415d774514471bd78c5230f to your computer and use it in GitHub Desktop.
Merge two JavaScript objects
function extend(dst, src) {
var k;
for(k in src)
dst[k] = src[k];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment