JS Built-ins
Symboldescriptionbeginner

Symbol.description β€” global symbol

πŸ“– Usage Example
const s = Symbol.for('global')
s.description   // β†’ 'global'

For Symbol.for(key), the .description equals the registration key.

Description of a Global Symbol

For Symbol.for('global'), the .description equals the registered key.

Challenge: Verify the description equals the key.

πŸ’‘ Hints (1)
  • β€’ For Symbol.for(), description and key are the same string.