Created
May 31, 2022 10:13
-
-
Save Ladvace/02057b9084f2876069e16d632faec983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Symbol('bar') === Symbol('bar') // false, each of them it's a unique id, the "bar" it's just a description and not an unique key | |
Symbol.for('foo'); // create a new global symbol | |
Symbol.for('foo'); // retrieve the already created symbol | |
Symbol.for('bar') === Symbol.for('bar') // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment