| Applying science to business management |
  
Assignment Operators
Assign x=y
You assign a value to a variable using the Assign
operator (=). Do not confuse this operator with the comparison
operator Equal (==) or the Define operator (:=). Assign
puts the value of y in the
storage location named x. x can be a variable, node name, list
element, or object property.
Compound Assignment x^=y
x*=y
x/=y
x%=y
x+=y
x-=y
x<<=y
x>>=y
x>>>=y
x&=y
x~=y
x|=y
Eleven Compound Assignment operators perform an operation in
addition to making an assignment. For example, the expression total+=2 adds 2 to the variable named total.
This is equivalent to total=total+2.
Similarly, the expression total*=5
is equivalent to total=total*5.
|