You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IsaacShelton edited this page Mar 21, 2022
·
1 revision
Variable Name
Variables names are used to refer to a variable.
Valid variable names match the regular expression /[a-zA-Z_\\:][a-zA-Z0-9_\\:]*/.
Examples
Plain variables
my_variable
_unused_var
value1234
"Namespaced" variables (very uncommon)
audio\context
window\context
svg\render\logger
audio:context
window:context
svg:render:logger
Namespaces
Variables that are "namespaced" with either \ or : are treated the same, since : is an accessibility syntax for \. So the following two examples are equivalent:
parse\ctx
parse:ctx
Underscore Prefixed
Variables names that are prefixed with an underscore don't generate warnings about being unused.