Global Registry With Symbol
Learn how to create or fetch keys for Symbols in the global registry.
We'll cover the following...
We'll cover the following...
Uniqueness of Symbols
When we create a Symbol using the Symbol() function, the argument passed to it has no significance, and each call to Symbol() creates a unique Symbol.
Proof by example
Let’s quickly verify this behavior with an example.
Explanation
- We created three
Symbols. Two of them were created using the same argumentname. - However, since the arguments passed to the function have no significance and the
Symbol