DEV Community

Discussion on: JavaScript Symbolism

Collapse
 
kepta profile image
Kushan Joshi

Great article K!
One more use case I can think of is that it allows JavaScript API to grow and avoid variable naming collision. For example I canโ€™t have a property called __proto__ in my object because old JS didnโ€™t have Symbols. But now with symbols they can introduce new things like Symbol.Iterator without resorting to weird things like __iterator__ ๐Ÿ˜….