Skip to content

Instantly share code, notes, and snippets.

@brianyang
Created December 23, 2014 12:45
Show Gist options
  • Save brianyang/d7811e5a3627e8c96a94 to your computer and use it in GitHub Desktop.
Save brianyang/d7811e5a3627e8c96a94 to your computer and use it in GitHub Desktop.
function extend(obj){
var args = [].slice.call(arguments, 1)
args.forEach(source){
for (prop in source){
obj[prop] = source[prop]
}
}
return obj
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment