Last active
April 26, 2017 04:56
-
-
Save devmobasa/cb2bdd833ab81ddae8553769195e1713 to your computer and use it in GitHub Desktop.
JavaScript symbols - getOwnPropertyNames - Coding Blast - www.codingblast.com
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 symbol1 = Symbol(); | |
| let symbol2 = Symbol(); | |
| var obj = { | |
| a: 13, | |
| [symbol1]: 5, | |
| [symbol2]: 11 | |
| }; | |
| let props = Object.getOwnPropertyNames(obj); | |
| console.log(props); // ["a"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment