0

I was reading the specs and couldn't understand:

The Symbol type is the set of all non-String values that may be used as the key of an Object property (6.1.7).

Each possible Symbol value is unique and immutable.

Each Symbol value immutably holds an associated value called [[Description]] that is either undefined or a String value.

6.1.5.1 Well-Known Symbols

Community
  • 1
  • 1
Boyang
  • 2,520
  • 5
  • 31
  • 49
  • 3
    The relevant [docs on MDN](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Symbol) might be a bit clearer than the spec. – James Allardice Feb 22 '16 at 21:11
  • It's exactly that. A type of values that can be used as object keys without being strings. You might want to read some tutorials or ES6 introductions to get examples where they are useful. – Bergi Feb 22 '16 at 21:23
  • See also [Why bring symbols to javascript?](http://stackoverflow.com/q/21724326/1048572) and [What is the point of the 'Symbol' type in ECMA-262-v6?](http://stackoverflow.com/q/30919170/1048572) – Bergi Feb 22 '16 at 21:30

0 Answers0