(ES6) ES6 (2016)

Symbol (SA00)

JavaScript Symbols: JavaScript Symbols are primarily intended as unique property keys. They are used as data, not metadata. While well-known symbols like Symbol.iterator allow customizing certain built-in behaviors, they are still used as property keys on objects. They directly participate in the object's behavior during runtime.:

Key Differences and Clarifications




It's used when you want an object to be asynchronously iterable (usable with for await...of loops).

1
2
3





Symbol context:






ES6 context:



Comments ( )
Link to this page: http://www.vb-net.com/JavascriptES6/SY00.htm
< THANKS ME>