assignment

A statement with a single equals sign, name = expression, which evaluates the right side and makes the name on the left refer to the result.

In more detail

It is not an equation: width = width + 5 means take the current width, add five and make width refer to the new value. The name must be on the left; 5 = width is a syntax error. Assignment shows nothing in the shell. Comparing for equality uses ==.

Example

width = 10
width = width + 5

Related terms

Taught in

References

Certification courses