WLJS LogoWLJS Notebook

Symbol

Symbol["name"] refers to a symbol with the specified name, creating it if necessary.

Examples

Create a symbol from a string:

Symbol["x"]
(* x *)

Dynamic symbol creation:

Symbol["var" <> ToString[1]]
(* var1 *)

Assign to dynamically created symbol:

Symbol["myVar"] = 42;
myVar
(* 42 *)

Please visit the official Wolfram Language Reference for more details.

On this page