Created
March 17, 2019 19:33
-
-
Save alejandrolechuga/711cf28a5412e9914350c41b6fbe2c83 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 (global) { | |
class A { | |
constructor() { | |
console.log('soy clase A'); | |
} | |
} | |
global.A = A; | |
}(this)); |
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 (global) { | |
class B { | |
constructor() { | |
console.log('soy clase A'); | |
} | |
} | |
global.B = B; | |
}(this)); |
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 (global) { | |
const A = global.A; | |
const B = global.B; | |
class Main { | |
constructor() { | |
this.instanciaA = new A(); | |
this.instanciaB = new B(); | |
} | |
} | |
new Main(); | |
}(this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment