forbeginnerSymbol.for('foo') === Symbol.for('foo') // β true
Symbol('foo') === Symbol('foo') // β falseSymbol.for() looks up a global registry β the same key always returns the identical symbol.
Symbol.for(key) looks up a Symbol in the global registry. If not found, it creates one. Calling it twice with the same key returns the same Symbol.
Challenge: Verify that Symbol.for('foo') === Symbol.for('foo').