Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const cat = {
name: 'foo'
}
const babycat = Object.assign({}, 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