Created
October 24, 2017 19:46
-
-
Save agatablue/6a5361dfeaaf67aa0675fe68c93998a9 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 alien = { | |
sayHello () { | |
return `Hello, my name is ${ this.name }`; | |
} | |
}; | |
const clark = Object.assign( | |
{}, | |
alien, | |
{name: 'Clark'} | |
); | |
clark.sayHello() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment