Skip to content

Instantly share code, notes, and snippets.

@JoseGonzalez321
Last active January 13, 2016 15:55
Show Gist options
  • Save JoseGonzalez321/da66fb19c3af340a8e3e to your computer and use it in GitHub Desktop.
Save JoseGonzalez321/da66fb19c3af340a8e3e to your computer and use it in GitHub Desktop.
var Person = (name, nickname) => {
return {
getFullName: () => name + ' (' + nickname + ')',
getName: () => 'Your name is: ' + name,
getNickname: () => 'People call you: ' + nickname,
};
};
var me = Person("Jose", "El Jefe");
console.log(me.getFullName());
console.log(me.getName());
console.log(me.getNickname());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment