Variables

Assigning Values to a Variable:

A variable can be assigned a value with the assignment statement.
The format is:   variable = newValue

Examples:
The new value is a constant:   x = 5
The new value is another variable:   x = y
The new value is an expression:    x = y/3
It can even use its current value in the expression:   x = x + 1
The last statement assigns a new value to x that is one more than its current value!

NEXT: Static Variables