Get Programming with JavaScript - Listing 2.01
Further Adventures
To declare a variable, use the var keyword.
Listing 2.01 - Declaring a variable - Task 3
- Declare two more variables.
var name;
var total;
The name you give to the variable must not be one of JavaScript's reserved words and it must follow the rules for valid identifiers.