TopLevel
Class Symbol
Symbol
Symbol is a primitive data type that can serve as object properties.
Symbol instance can be created explicitly or via a global registry, see for(String).
API Versioned:
From version 21.2.
Constants
hasInstance
:
Symbol
The symbol used by
instanceof
.
isConcatSpreadable
:
Symbol
The symbol used by Array.concat(Object...).
iterator
:
Symbol
The symbol used by
for...of
.
match
:
Symbol
The symbol used by String.match(RegExp).
replace
:
Symbol
The symbol used by
String.replace()
.
search
:
Symbol
The symbol used by String.search(RegExp).
species
:
Symbol
The symbol used to create derived objects.
split
:
Symbol
The symbol used by
String.split()
.
toPrimitive
:
Symbol
The symbol used to convert an object to a primitive value.
toStringTag
:
Symbol
The symbol used by Object.toString().
unscopables
:
Symbol
The symbol used by
with
.Properties
Constructor Summary
Symbol()
Creates a new symbol.
Method Summary
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Constructor Detail
Symbol
public Symbol()
Creates a new symbol. Note that it must be called without
new
.
Symbols created via this method are always distinct.Symbol
public Symbol(description
:
String)
Creates a new symbol. Note that it must be called without
new
.
Symbols created via this method are always distinct.
Parameters:
description
-
A description for this symbol.
Method Detail
for
Obtains a symbol from the global registry. If no symbol exists for the key within the registry a new symbol is
created and stored in the global registry.
API Versioned:
From version 21.2.
Parameters:
key
-
The key for a symbol within the global registry.
Returns:
The found or newly created symbol.
© Copyright 2000-2024, salesforce.com inc. All rights reserved. Various trademarks held by their respective owners.