Created
December 31, 2018 09:22
-
-
Save debugmodedotnet/9f10dce8026b3af3c2f2cfe01f4c074b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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