Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@agatablue
Created October 24, 2017 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agatablue/6a5361dfeaaf67aa0675fe68c93998a9 to your computer and use it in GitHub Desktop.
Save agatablue/6a5361dfeaaf67aa0675fe68c93998a9 to your computer and use it in GitHub Desktop.
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