Skip to content

Instantly share code, notes, and snippets.

@cmilfont
Created February 4, 2017 12:04
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 cmilfont/7bdd7ca22aead580997e4d53826a1943 to your computer and use it in GitHub Desktop.
Save cmilfont/7bdd7ca22aead580997e4d53826a1943 to your computer and use it in GitHub Desktop.
function A(name) {
this.name = name || 'Christiano';
return this.name;
}
function B() {
this.surname = 'Milfont';
this.getName = function() {
return `${this.name} - ${this.surname}`;
}
this.whatever = A;
this.acontece = function(name) {
return this.whatever();
}
}
a = new A
b = new B
b.name = b.acontece('Marcelo');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment