Created
July 1, 2018 15:10
-
-
Save nairihar/355870d666cf904434c7fd93b40248a4 to your computer and use it in GitHub Desktop.
JavaScript series, part 2, Map, medium
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
const obj = {}; | |
function test() { | |
return 1; | |
} | |
obj[test] = 123; | |
console.log(obj); | |
// "function test() {↵ return 1;↵}" : 123 | |
console.log(test.toString()); | |
/* | |
function test() { | |
return 1; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment