Created
November 9, 2016 06:34
-
-
Save earlwlkr/c722b4cae81a66938070261a4ab43b77 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var b = {}; | |
| var a = { | |
| f: function () { | |
| console.log(this.value); | |
| } | |
| }; | |
| a.value = 2; | |
| a.f(); // (1) | |
| b.f = a.f; | |
| b.f(); // (2) | |
| // Hoi gia tri in ra tai (1) va (2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment