MENU
Assignment Operators
So far we have seen how = can be used to assign values to variables. Sometimes, when updating a variable using its value, we can shorten the code by including a second operator in front of =. For example: a += 3 is identical to a = a +3Such assignment operators include +=, -=, *=, /=, %=, **=, &=, |=, ^=, <<=, >>=, and >>>=.Note that += can be applied to strings (concatenation).