Operands are the things that are acted upon by operators. They are typically positioned either side of an operand to form an expression. For this reason, you’ll sometimes hear them referred to as “left-hand operands” (or “left operand”) and “right-hand operands” (or “right operand”), describing their position in the expression. For example:
var x = 5;
In this case, the equals sign is an operator, and the
5 are operands (the left and right-hand operands, respectively. Of course,
x also signifies a variable in this instance). Taken together, they form an expression.
Operators can do many things to operands: compare them, increment them, decrement them, divide them, and more. Conventionally, they are grouped together as arithmetic operators, bitwise operators, assignment operators, increment operators, comparison operators and logical operators, along with a collection of others. Each of them will be covered as separate entries in this reading list.
Photograph by Xtef Mistik, licensed under Creative Commons.
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.