Glossary Term
Symbol() constructor
The Symbol() function returns primitive values of type Symbol.
Parameters: description A string. A description of the symbol which can be used for debugging but not to access the symbol itself.
description A string. A description of the symbol which can be used for debugging but not to access the symbol itself.
To create a new primitive symbol, you write Symbol() with an optional string as its description:
The above code creates three new symbols. Note that Symbol(“foo”) does not coerce the string “foo” into a symbol. It creates a new symbol each time:
Syntax example: Symbol()
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
