Variables and functions have unique names. These names are called identifiers.
You should not use any of the reserved keywords as identifier names.
An identifier refers to a variable, property or function and is the user defined way to distinguish one item from another.
Identifiers can be of unlimited length, although for practical purposes, they should be kept to a reasonable length, say 30 to 40 characters at most. The following characters are valid for use in identifiers:
a b c d e f g h i j k l m
n o p q r s t u v w x y z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
Identifiers are case-sensitive. The following all denote different identifiers:
The dollar sign should be used sparingly and according to the ECMA standard is reserved for use by mechanically generated code.
You cannot use reserved words as identifier names.
Avoid using the dollar sign. MSIE version 3.0 and Netscape 2.02 cannot cope with dollar signs in variable names. MSIE version 3.02 cannot tell the difference between one identifier and another when the names only differ in the case of the letters that spell the identifier name.
ECMA 262 edition 2 - section - 7.5
ECMA 262 edition 3 - section - 7.6