How does += (plus equal) work? March 28, 2023 by Tarik 1 += 2 is a syntax error (left-side must be a variable). x += y is shorthand for x = x + y.