What is the syntax to use augmented assignment statements?

  1. variable += 1 INSTEAD OF variable = variable + 1
  2. variable -= 1 INSTEAD OF variable = variable – 1
  3. variable *= 1 INSTEAD OF variable = variable * 1
  4. variable /= 1 INSTEAD OF variable = variable / 1
  5. variable %= 1 INSTEAD OF variable = variable % 1
Advertisements