October 2015
Beginner
246 pages
4h 6m
English
When mathematical calculations are performed in a program, each operation takes place according to a prespecified order. This order of operations ensures that the code is run the same way every time. This is no different from arithmetic or algebra, but programming has other operators that are less familiar.
In the following table, the operators on the top are run before those on the bottom—therefore, an operation inside parentheses will run first and an assignment will run last:
| Name | Symbol | Examples |
|---|---|---|
|
Parentheses |
|
|
|
Postfix, Unary |
|
|
|
Multiplicative |
|
|
|
Additive |
|
|
|
Relational |
|
|
|
Equality |
|
|
Read now
Unlock full access