Created
December 27, 2020 22:24
-
-
Save reime005/07ae0e72ee2d5fc6ac3adffaae56781f 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 test() { | |
console.log(this); | |
} | |
const test2 = () => console.log(this); | |
const bigObject = { | |
someValue: 42, | |
test, | |
test2 | |
} | |
bigObject.test(); | |
/* | |
{ someValue: 42, | |
test: [Function: test], | |
test2: [Function: test2] } | |
*/ | |
bigObject.test2(); | |
/* | |
{} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment