var The var statement is used to indicate the declaration of a variable. Where you place the variable has great impact on what can access it. If the variable is declared inside a function, the variable is said to be a "Local Variable". That is, it is accessible only to the statements within that one function. If the variable is declared outside of a function, it is said to be a "Global Variable", and is accessible by all statements within all functions, for that one HTML document. Stating the var statement isn't neccessary for Global Variables, but it is a good programming convention to use it anyway. This takes the guesswork out of interpreting it at a later date. You may declare many variables at the same time by separating them (delimiting' them) with a comma, as follows: var variableName, variableName, variableName; The drawback to this is the fact that the variables have no values assigned to them. To assign an intial value to a variable, follow the variable name with an equals sign and the required value, as follows: var variableName = value The value may be any valid JavaScript data type. To specify the value is a string, and thus unexecutable data, enclose it within quotes. syntax: var variableName, variableName, variableName; or var variableName = value; EXAMPLE var variableOne = "Global Variable"; function container() { var variableTwo = "Local Variable"; } From the above example, you can see that two variables were declared. The first was called "variableOne" and contains the string "Global Variable". The second variable was called "variableTwo" and contains the string "Local Variable". VariableOne is a global variable because it was not declared within a function, and variableTwo is a local variable because it was declared within a function.