Skip to content

Instantly share code, notes, and snippets.

@debugmodedotnet
Created December 31, 2018 09:22
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 debugmodedotnet/9f10dce8026b3af3c2f2cfe01f4c074b to your computer and use it in GitHub Desktop.
Save debugmodedotnet/9f10dce8026b3af3c2f2cfe01f4c074b to your computer and use it in GitHub Desktop.
const cat = {
name: 'foo',
age: 9
}
const babycat = Object.assign({ age: 1 }, cat);
for (var prop in babycat) {
console.log(prop + ':' + babycat[prop]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment