Variables

One of the first things that you need to know when working with JavaScript is variables. Variables are containers in which you can store information — for example a number. The variables can be used throughout your code to access the information that you previously assigned to them.
In the following exercises, you'll learn how to declare variables, how to assign and reassign values to a variable, and how to call variables to access their values.
  1. Accessing a variable (1)
  2. Accessing a variable (2)
  3. Declare a variable and assign a number
  4. Reassign a value to a variable (1)
  5. Reassign a value to a variable (2)