Created
April 7, 2016 08:15
-
-
Save codemilli/567a41f781e8f23d8596dcb2b57260fe 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
| let obj1 = { | |
| cb: function () { | |
| let that = this; | |
| let fun = function () { | |
| console.log('this => ', this); // undefined | |
| console.log('that => ', that); // { cb: [Function] } | |
| }; | |
| fun(); | |
| } | |
| }; | |
| let obj2 = { | |
| cb: function () { | |
| let fun = () => { | |
| console.log('this => ', this); // { cb: [Function] } | |
| }; | |
| fun(); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment