var <variable-name>; var <variable-name> = <value>;
var one = 1; var two = 'two';
Rules of Naming Variable :
- The first character must be a letter or an underscore (-) or an dollar($). You can not use a number as the first character.
- . The variable name can include any letter, any number, or the underscore. Can’t use any other characters, including spaces.
- Variable names are case sensitive
- No limit to the length of the variable name.