There are, however, specific naming conventions that must be followed. Variable names Must begin with an alphabetic character or the underline character Can be composed of letters, numerals, or the underline character Cannot contain blank spaces Cannot be the same as a JavaScript reserved word. These are words that have special meanings in JavaScript and are reserved for those purposes. Otherwise, you are free to name your variables as you wish. It makes sense, of course, to assign names that readily identify the kinds of data being stored there.
Variable names are case-sensitive.
Be sure you pay careful attention to the names assigned and use them consistently. The formal method of naming and establishing variables is to declare them with the var keyword. Any time the JavaScript script needs to refer to or access the data, it does so through the names assigned to those locations. Thus, a script reference to LastName is a reference to whatever piece of data currently resides in that memory location. A reference to the name of a variable is actually a reference to the data stored in that variable.