Created
April 26, 2020 19:30
-
-
Save shonnly/d2d9ad1b499f83609541cbc301e4ec4a 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
var obj = {}; | |
obj[Symbol.for('name')] = 'Jordan'; | |
console.log(obj); // {Symbol(name): "Jordan"} | |
obj[Symbol.for('name')] = 'Jordan'; // Idempotent? Yes. | |
console.log(obj); // {Symbol(name): "Jordan"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment