Basic Arithmetic Operations on Integers

This lesson digs into the basic arithmetic operations on integers.

We will take advantage of the .min and .max properties below, which we have seen in the fundamental types lesson. These properties provide the minimum and maximum values that an integer type can have.

Increment: ++ #

This operator uses a single operand (usually a variable or an expression) and is written before the name of that variable. It increments the value of that variable by 1:

Get hands-on with 1400+ tech skills courses.