-
-
Notifications
You must be signed in to change notification settings - Fork 9
Variable Name
IsaacShelton edited this page Mar 21, 2022
·
1 revision
Variables names are used to refer to a variable.
Valid variable names match the regular expression /[a-zA-Z_\\:][a-zA-Z0-9_\\:]*/
.
my_variable
_unused_var
value1234
audio\context
window\context
svg\render\logger
audio:context
window:context
svg:render:logger
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
Variables names that are prefixed with an underscore don't generate warnings about being unused.
_my_unused_variable