Page Stats
Visitor: 500
JavaScript Variable
Variables are the different names used for temporary storage of data. Variable can have any type of value i.e. number, string, boolean, date etc. The data stored in these variables can be changed during the execution of the program. Variable name can be much longer and more descriptive name. While naming the variable you should remember the following points:
- No reserved words or keywords are used
- You can use both upper or lower case letters, numbers and underscore
- Must begin with a letter or underscore, but not with a number
Valid variable name - FirstName, firstname, first_name, Name1
Invalid variable name - 1Name, switch First Name