Created
June 27, 2012 06:05
-
-
Save syshen/3001831 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
| function test1() { | |
| this.name = "test1"; | |
| this.print = function() { | |
| console.log(this.name); | |
| } | |
| } | |
| function test2() { | |
| this.name = "test2"; | |
| } | |
| var t1 = new test1(); | |
| var t2 = new test2(); | |
| t1.print.call(t2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment