Created
February 4, 2017 12:04
-
-
Save cmilfont/7bdd7ca22aead580997e4d53826a1943 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
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