keyForbeginnerconst s = Symbol.for('hello')
Symbol.keyFor(s) // β 'hello'Symbol.keyFor() reverses Symbol.for() β it returns the string key used to register a global symbol.
Symbol.keyFor(sym) returns the string key used to register a symbol in the global registry, or undefined for local symbols.
Challenge: Verify that Symbol.keyFor(Symbol.for('hello')) === 'hello'.