Created
July 29, 2021 22:11
-
-
Save rooklift/39791c487cdc7b8da931d89d7a4a058f 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
"use strict"; | |
const barker_props = { | |
bark() { | |
console.log(`Woof, I am ${this.name}`); | |
} | |
}; | |
const meower_props = { | |
meow() { | |
console.log(`Meow, I am ${this.name}`); | |
} | |
}; | |
let dogcat = Object.assign( | |
{name: "Pebbles"}, | |
barker_props, | |
meower_props, | |
); | |
dogcat.bark(); | |
dogcat.meow(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment