Home >Web Front-end >JS Tutorial >JavaScript variable naming rules_basic knowledge
JScript is a case-sensitive language.
The first character must be an ASCII letter (upper or lower case), or an underscore (_). Note that the first character cannot be a number.
Following characters must be letters, numbers or underscores.
Variable names must not be reserved words.
Some examples of legal variable names are given below:
_pagecount Part9 Number_Items Some examples of invalid variable names are given below:
99Balloons // Cannot start with a number. Smith&Wesson // The ampersand (&) character is invalid for variable names.