--Lingo syntax
#symbolName
// JavaScript syntax
symbol("symbolName");
Symbol operator; defines a symbol, a self-contained unit that can be used to represent a condition or flag. The value symbolName begins with an alphabetical character and may be followed by any number of alphabetical or numerical characters.
A symbol can do the following:
A symbol takes up less space than a string and can be manipulated, but unlike a string it does not consist of individual characters. You can convert a symbol to a string for display purposes by using the string function.
The following are some important points about symbol syntax:
All symbols, global variables, and names of parameters passed to global variables are stored in a common lookup table.
This statement sets the state variable to the symbol #Playing:
-- Lingo syntax
state = #Playing
// JavaScript syntax
var state = symbol("Playing");