Symbol
symbol - a new ES6 primitive type and its use cases
We'll cover the following...
We'll cover the following...
ES6 introduces a new primitive type for JavaScript: Symbols. The global Symbol() function creates a JavaScript symbol. Each time the Symbol() function is called, a new unique symbol is returned.
Symbols don’t have a literal value. All you should know about the value of a symbol is that each symbol is treated as a unique value. In other words, no two symbols are equal.
A symbol is a new type in JavaScript.
Symbols are useful, because they act as unique object keys.
When console logging myObject inside the Chrome Developer Tools, you can see that both symbol properties are stored in the ...