SOLVED What does += mean?


#1

Figured it out its like x = x + 1 but compact


#2

Well for languages, that have syntax like C(JavaScript, PHP etc) have some cool methods that can make code shorter:

x = x+y => x+=y
x = x - y => x-=y
x = x * y => x*=y
x = x / y => x/=y
x = x + 1 => x++ => ++x
x = x - 1 => x-- => --x