Symbol.keyFor()
Symbol.keyFor() is a JavaScript method in the Symbol category. Returns the key of a global symbol. The syntax is Symbol.keyFor(sym). A typical example: Symbol.keyFor(Symbol.for("app")) // "app". A close sibling is Symbol(), which creates a unique symbol. A close sibling is Symbol.for(), which looks up or creates a symbol in the global registry. A close sibling is Symbol.prototype.toString(), which returns a string representation. A close sibling is Symbol.iterator, which the well-known symbol for the default iterator. More about this category: Symbol methods and properties. Related Symbol methods: Symbol(), Symbol.for(), Symbol.prototype.toString(), Symbol.iterator, Symbol.asyncIterator, Symbol.hasInstance, Symbol.toStringTag, Symbol.toPrimitive. This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try Symbol.keyFor() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.