Changes

Jump to: navigation, search

Introducing JavaScript Variables

438 bytes added, 18:41, 11 April 2007
Variable Declaration and the Assignment Operator
myVariable = 10;
</pre>
 
== JavaScript Variable Naming Conventions ==
 
JavaScript variable names are made up of letter, numbers and underscores. They cannot contain spaces and must not begin with a number. For example ''sales_percentage'' would be a valid variable name, where as ''sales percentage'' would be invalid because it contains a space character. Similarly ''two_layers'' is valid, but ''2_layers'' is not due to the fact that it begins with a number.

Navigation menu