3 ms·
Symbols + Maps have some neat gotchas that are good to be aware of. For example, if you use Symbols as keys in an object, Object.keys() or for...of/in will NOT
by winrid 5y ago
Symbols + Maps have some neat gotchas that are good to be aware of.
For example, if you use Symbols as keys in an object, Object.keys() or for...of/in will NOT return/iterate over those keys. You have to use Object.getOwnPropetySymbols()...