Symbol, which dynamically produces an anonymous, unique value. A symbol may be used as an object property.
Symbol can have an optional description, but for debugging purposes only.
Symbol type is a new feature in ECMAScript 2015 and there is no ECMAScript 5 equivalent for symbol. In some programming languages the symbol data type is referred to as an "atom."
Symbol class has constants for so-called well-known symbols. These symbols let you configure how JS treats an object, by using them as property keys. Examples of well-known symbols are:
Symbol.iterator for array-like objects, or
Symbol.search for string objects.
Global symbol registry
The methods that access the global symbol registry are
Symbol.for("tokenString") returns a symbol value from the registry, and
Symbol.keyFor(symbolValue) returns a token string from the registry; each is the other's inverse, so the following is true:
Symbol.keyFor(Symbol.for("tokenString")) == "tokenString"; // true