Skip to content

Symbol

length number

name string

prototype object

for(key) function

Search the global symbol registry for a symbol with the given key. If found, return that symbol; otherwise, create a new symbol with that key and add it to the registry, then return the new symbol.

key: A string key used to identify the symbol in the global registry.

Returns: A symbol associated with the given key in the global registry.

keyFor(sym) function

Retrieve a shared symbol’s key from the global symbol registry. If the symbol is not in the global registry, return undefined.

sym: The symbol to find the key for.

Returns: The string key if 'sym' is a global symbol, otherwise undefined.

toPrimitive symbol

iterator symbol

match symbol

matchAll symbol

replace symbol

search symbol

split symbol

toStringTag symbol

isConcatSpreadable symbol

hasInstance symbol

species symbol

unscopables symbol

asyncIterator symbol

operatorSet symbol