Assignment Operators

Assignment Operators

Operator Definition
Assign x=y Assign a value to a variable. 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. See Equal. See Define.
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 x!!=y 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.