Javascript identifiers are used for naming functions and variables. These must be defined in accordance with the following rules:
- must not be a Javascript reserved word (list)
- may contain letters, digits (0 to 9), dollar signs ($) and underscores (_)
- must start with a letter, a dollar sign ($) or an underscore (_)
- must be case-sensitively unique to its context (you cannot have two variables with the same name)
Valid:
- _aVar
- var123
- my_function
Invalid:
- var (breaks rule 1)
- my#Function (breaks rule 2)
- 1goodVar (breaks rule 3)