JavaScript naming rules
- Identifiers begin with a letter, underscore or $, then letters, digits or underscores; can be any length
- They are case-sensitive:
Date
is not the same as date
- There are certain keywords and reserved words to avoid - all lower case
Conventions
- Data type (class) names begin with capital letters -
Person
- Use all capitals for constants -
CM_PER_INCH
- All other identifiers use "camelCase" starting with lower -
firstName
- For those coming from C/C++: don't use the old "Hungarian" prefixes