JavaScript Rules for naming variables
*camelCase
If a variable name is more than one word, it is usually written in camelCase.
This means the first word is all lowercase and any subsequent words have their first letter capitalized.
*DATA TYPES
JavaScript distinguishes between numbers, strings, and true or false values known as Booleans.
- Numeric Data Type
- String Data Type
- Boolean Data Type
*Rules for naming variables
- The name must begin with a letter, dollar sign($), or an underscore(_). It must not start with a number.
- The name can contain letters, numbers, dollar sing($), or an underscore(_). Note that you must not use a dash(-) or a period(.) in a variable name.
- You cannot use keywords or reserved words. Keywords are special words that tell the interpreter to do something.
For example, var is a keyword used to declare a variable. Reservled words are ones that may be used in a future version of JavaScript. - All variables are case sensitive
- Use a name that describes the kind of information that the variable stores.
- If your variable name is made up of more than one word, use a capital letter for the first letter of every word after the first word.