Please enable JavaScript to use CodeHS

Chapter 1

Primitive Types

1.5 Compound Assignment Operators

Evaluating What is Stored in a Variable

Arithmetic Shortcuts

All Functions Calculator

Increase/Decrease by 1

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Work Shift


Term Definition
Increment Increase the value of a variable by one. variable++;
Decrement Decrease the value of a variable by one. variable--;
Compound Assignment Operators Allows programmers to shortcut variable assignments that include the variable being assigned a new value: x = x + y; shortcut: x += y;