Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const cat = {
name: 'foo'
const babycat = {
age: '1',
color: 'white'
//babycat.__proto__ = cat; // I love this more
Object.setPrototypeOf(babycat, cat);
for (var prop in babycat) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment